[sr-dev] git:4.2:a3a050c8: modules/nathelper: don't include enclosing bracket in contact uri in set_contact_alias

Federico Cabiddu fcabiddu at orange-vallee.net
Mon May 11 09:37:44 CEST 2015


Module: kamailio
Branch: 4.2
Commit: a3a050c862398e6afa39f5dc1b00b0e9f93aad1a
URL: https://github.com/kamailio/kamailio/commit/a3a050c862398e6afa39f5dc1b00b0e9f93aad1a

Author: Federico Cabiddu <federico.cabiddu at gmail.com>
Committer: Federico Cabiddu <fcabiddu at orange-vallee.net>
Date: 2015-05-11T09:37:27+02:00

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

(cherry picked from commit b525ada2d12bf85c385a5f97859afd5d52405354)

---

Modified: modules/nathelper/nathelper.c

---

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

---

diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index 87289f9..58f56b4 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -918,8 +918,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