Skip to content
Browse files

clusterer: Fix misaligned sync packets (related to be7265f)

Commit be7265f broke the sync on `master`, since it did not take into
account commit 40b7422, where the BIN packet receival mechanism was

Reported by Răzvan Crainea
Credits to Vlad Pătrașcu for helping speed up the fix
  • Loading branch information
liviuchircu committed Sep 19, 2019
1 parent 7bb74db commit fabcfa1ded10a5281659f71a3bfbec0dc9dd69ca
Showing with 3 additions and 1 deletion.
  1. +3 −1 modules/clusterer/clusterer.c
@@ -1874,14 +1874,16 @@ void run_mod_packet_cb(int sender, void *param)
struct packet_rpc_params *p = (struct packet_rpc_params *)param;
bin_packet_t packet;
str cap_name;
int data_version;

bin_init_buffer(&packet, p->pkt_buf.s, p->pkt_buf.len);
packet.src_id = p->pkt_src_id;
packet.type = p->pkt_type;

if (packet.type == SYNC_PACKET_TYPE) {
/* if we have a sync packet, we have to skip once again the capability */
/* this packet is cloned and both below fields have been used */
bin_pop_str(&packet, &cap_name);
bin_pop_int(&packet, &data_version);
next_data_chunk = NULL;

0 comments on commit fabcfa1

Please sign in to comment.
You can’t perform that action at this time.