Skip to content

Commit

Permalink
dialog: update contact & SDPs for replicated updates
Browse files Browse the repository at this point in the history
(cherry picked from commit 52e6c42)
  • Loading branch information
razvancrainea committed Nov 5, 2020
1 parent 5292252 commit a6fdb66
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion modules/dialog/dlg_replication.c
Expand Up @@ -365,7 +365,34 @@ int dlg_replicated_update(bin_packet_t *packet)
goto error;
}

bin_skip_str(packet, 12);
/* route set */
bin_skip_str(packet, 2);

/* sync caller and callee contact */
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[DLG_CALLER_LEG].contact, &st);
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[callee_idx(dlg)].contact, &st);

/* from & to URIs set */
bin_skip_str(packet, 2);

/* sync SDPs */
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[DLG_CALLER_LEG].in_sdp, &st);
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[DLG_CALLER_LEG].out_sdp, &st);
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[callee_idx(dlg)].in_sdp, &st);
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[callee_idx(dlg)].out_sdp, &st);

/* sync advertised caller and callee contacts */
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[DLG_CALLER_LEG].adv_contact, &st);
bin_pop_str(packet, &st);
shm_str_sync(&dlg->legs[callee_idx(dlg)].adv_contact, &st);

bin_pop_str(packet, &vars);
bin_pop_str(packet, &profiles);
bin_pop_int(packet, &dlg->user_flags);
Expand Down

0 comments on commit a6fdb66

Please sign in to comment.