Skip to content

Commit

Permalink
Update rtpproxy.c
Browse files Browse the repository at this point in the history
When moving stored parameters from Branch AVP to Dialog variable, make sure that the integer value "setid" is handled correctly so that it remains valid for the remainder of the dialog.
(cherry picked from commit e267e9e)
  • Loading branch information
davesidwell authored and razvancrainea committed Jun 17, 2016
1 parent 5708cf5 commit 2edafc6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/rtpproxy/rtpproxy.c
Expand Up @@ -2725,6 +2725,7 @@ static int move_bavp2dlg(struct sip_msg *msg, struct dlg_cell *dlg, str *rval1,
unsigned int ip_found = 0;
unsigned int set_found = 0;
pv_value_t val1, val2, val3;
str param3_val;

if (!msg || !dlg || msg->first_line.type != SIP_REPLY)
goto not_moved;
Expand Down Expand Up @@ -2782,8 +2783,11 @@ static int move_bavp2dlg(struct sip_msg *msg, struct dlg_cell *dlg, str *rval1,
}

if (set_found) {
if (dlg_api.store_dlg_value(dlg, &param3_name, &val3.rs) < 0) {
LM_ERR("cannot store set-id value\n");
/* Store Set ID INT value correcty in dlg */
param3_val.s = (char*)&val3.ri;
param3_val.len = sizeof(unsigned int);
if (dlg_api.store_dlg_value(dlg, &param3_name, &param3_val) < 0) {
LM_ERR("cannot store setid value\n");
goto error;
}
} else {
Expand Down

0 comments on commit 2edafc6

Please sign in to comment.