Skip to content

Commit

Permalink
dialog: swap the leg when starting 2nd re-INVITE in challenge mode
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Feb 1, 2021
1 parent be76c41 commit d698da1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/dialog/dlg_req_within.c
Expand Up @@ -771,9 +771,11 @@ static void dlg_sequential_reply(struct cell* t, int type, struct tmcb_params* p
/* if we have to negotiate, let's do it! */
p->ref++;
p->state = DLG_CHL_PENDING;
/* swap the leg */
p->leg = other_leg(dlg, p->leg);

ref_dlg(dlg, 1);
if (send_leg_msg(dlg, &p->method, other_leg(dlg, p->leg), p->leg,
if (send_leg_msg(dlg, &p->method, p->leg, other_leg(dlg, p->leg),
&extra_headers, &body,
dlg_sequential_reply, p, dlg_sequential_free,
&dlg->legs[p->leg].reply_received) < 0) {
Expand Down

0 comments on commit d698da1

Please sign in to comment.