Skip to content

Commit

Permalink
fix: add _patch field in copy functions
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Dec 4, 2024
1 parent 733a23d commit e73ce42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/protocol/definitions/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ void _z_t_msg_copy_join(_z_t_msg_join_t *clone, _z_t_msg_join_t *msg) {
clone->_req_id_res = msg->_req_id_res;
clone->_batch_size = msg->_batch_size;
clone->_next_sn = msg->_next_sn;
#if Z_FEATURE_FRAGMENTATION == 1
clone->_patch = msg->_patch;
#endif
memcpy(clone->_zid.id, msg->_zid.id, 16);
}

Expand All @@ -325,6 +327,9 @@ void _z_t_msg_copy_init(_z_t_msg_init_t *clone, _z_t_msg_init_t *msg) {
clone->_batch_size = msg->_batch_size;
memcpy(clone->_zid.id, msg->_zid.id, 16);
_z_slice_copy(&clone->_cookie, &msg->_cookie);
#if Z_FEATURE_FRAGMENTATION == 1
clone->_patch = msg->_patch;
#endif
}

void _z_t_msg_copy_open(_z_t_msg_open_t *clone, _z_t_msg_open_t *msg) {
Expand Down

0 comments on commit e73ce42

Please sign in to comment.