[sr-dev] git:master:a151e1fd: Merge pull request #154 from grumvalski/set_contact_alias_fix

Daniel-Constantin Mierla miconda at gmail.com
Sun May 10 18:17:13 CEST 2015


Module: kamailio
Branch: master
Commit: a151e1fd67d3fb6d7f61646df8f0125e4f034162
URL: https://github.com/kamailio/kamailio/commit/a151e1fd67d3fb6d7f61646df8f0125e4f034162

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-05-10T18:17:07+02:00

Merge pull request #154 from grumvalski/set_contact_alias_fix

modules/nathelper: don't include enclosing brackets in contact uri in set_contact_alias

---

Modified: modules/nathelper/nathelper.c

---

Diff:  https://github.com/kamailio/kamailio/commit/a151e1fd67d3fb6d7f61646df8f0125e4f034162.diff
Patch: https://github.com/kamailio/kamailio/commit/a151e1fd67d3fb6d7f61646df8f0125e4f034162.patch

---

diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index 14880a7..f6791db 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -921,8 +921,8 @@ set_contact_alias_f(struct sip_msg* msg, char* str1, char* str2)
 		pkg_free(buf);
 		return -1;
 	}
-	c->uri.s = buf;
-	c->uri.len = len;
+	c->uri.s = buf + br;
+	c->uri.len = len -2*br;
 
 	return 1;
 }




More information about the sr-dev mailing list