Module: kamailio
Branch: master
Commit: 08df9d1b11ff3fcfe241ce179560431145be8216
URL:
https://github.com/kamailio/kamailio/commit/08df9d1b11ff3fcfe241ce179560431…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-24T11:44:33+01:00
nathelper: fixed interpretation of flags param for add_rcv_param()
- add as uri param when the flags are set and different than 0
- small typo in log message
---
Modified: src/modules/nathelper/nathelper.c
---
Diff:
https://github.com/kamailio/kamailio/commit/08df9d1b11ff3fcfe241ce179560431…
Patch:
https://github.com/kamailio/kamailio/commit/08df9d1b11ff3fcfe241ce179560431…
---
diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index 5eb7f6a12f..168bae09cc 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -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;
@@ -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;
}
}