Skip to content

Commit

Permalink
nathelper: fixed interpretation of flags param for add_rcv_param()
Browse files Browse the repository at this point in the history
- add as uri param when the flags are set and different than 0
- small typo in log message

(cherry picked from commit 08df9d1)
  • Loading branch information
miconda committed Feb 22, 2018
1 parent c52820b commit d5140f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/modules/nathelper/nathelper.c
Expand Up @@ -2104,12 +2104,15 @@ static int create_rcv_uri(str *uri, struct sip_msg *m)
* Add received parameter to Contacts for further
* forwarding of the REGISTER requuest
*/
static int ki_add_rcv_param(sip_msg_t *msg, int hdr_param)
static int ki_add_rcv_param(sip_msg_t *msg, int upos)
{
contact_t *c;
struct lump *anchor;
char *param;
str uri;
int hdr_param;

hdr_param = (upos)?0:1;

if(create_rcv_uri(&uri, msg) < 0) {
return -1;
Expand Down Expand Up @@ -2169,7 +2172,7 @@ static int add_rcv_param_f(struct sip_msg *msg, char *str1, char *str2)

if(str1) {
if(fixup_get_ivalue(msg, (gparam_t*)str1, &hdr_param)<0) {
LM_ERR("failed to get falgs parameter\n");
LM_ERR("failed to get flags parameter\n");
return -1;
}
}
Expand Down

0 comments on commit d5140f1

Please sign in to comment.