Module: kamailio
Branch: 4.3
Commit: 68141ae0610faefafe3de25d98fcc09f9ffb2524
URL:
https://github.com/kamailio/kamailio/commit/68141ae0610faefafe3de25d98fcc09…
Author: grumvalski <federico.cabiddu(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2016-07-08T10:57:04+02:00
tm: check branch uri against current uri when deciding if append a new branch
(cherry picked from commit 335e44635aa69ab73ec76f713a7d5ce7ce06748c)
---
Modified: modules/tm/t_append_branches.c
---
Diff:
https://github.com/kamailio/kamailio/commit/68141ae0610faefafe3de25d98fcc09…
Patch:
https://github.com/kamailio/kamailio/commit/68141ae0610faefafe3de25d98fcc09…
---
diff --git a/modules/tm/t_append_branches.c b/modules/tm/t_append_branches.c
index 7a928f7..01aacbc 100644
--- a/modules/tm/t_append_branches.c
+++ b/modules/tm/t_append_branches.c
@@ -127,7 +127,9 @@ int t_append_branches(void) {
found = 0;
for (i=0; i<outgoings; i++) {
if (t->uac[i].ruid.len == ruid.len
- && !memcmp(t->uac[i].ruid.s, ruid.s, ruid.len)) {
+ && !memcmp(t->uac[i].ruid.s, ruid.s, ruid.len)
+ && t->uac[i].uri.len == current_uri.len
+ && !memcmp(t->uac[i].uri.s, current_uri.s, current_uri.len)) {
LM_DBG("branch already added [%.*s]\n", ruid.len, ruid.s);
found = 1;
break;