Skip to content

Commit

Permalink
rtpproxy: fix rtpproxy_engage() pvar expansion
Browse files Browse the repository at this point in the history
Reported by Ovidiu Sas
Closes #195
  • Loading branch information
razvancrainea committed Apr 10, 2014
1 parent a6fd82d commit 4fd00f1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/rtpproxy/rtpproxy.c
Expand Up @@ -2977,6 +2977,7 @@ engage_rtp_proxy4_f(struct sip_msg *msg, char *param1, char *param2, char *param
struct dlg_cell *dlg;
struct rtpp_set *set = NULL;
pv_value_t val1, val2;
str aux_str;

LM_DBG("engage called from script 1:%p 2:%p 3:%p 4:%p\n",
param1, param2, param3, param4);
Expand Down Expand Up @@ -3016,6 +3017,22 @@ engage_rtp_proxy4_f(struct sip_msg *msg, char *param1, char *param2, char *param
return -1;
}

if (param1) {
if (rtpp_get_var_svalue(msg, (gparam_p)param1, &aux_str, 0)<0) {
LM_ERR("bogus flags parameter\n");
return -1;
}
param1 = aux_str.s;
}

if (param2) {
if (rtpp_get_var_svalue(msg, (gparam_p)param2, &aux_str, 1)<0) {
LM_ERR("bogus IP addr parameter\n");
return -1;
}
param2 = aux_str.s;
}

/* is this a late negociation scenario? */
if (msg_has_sdp(msg)) {
LM_DBG("message has sdp body -> forcing rtp proxy\n");
Expand Down

0 comments on commit 4fd00f1

Please sign in to comment.