浏览代码

modules/tm: cycle through all the uac while checking for already existing branches

Federico Cabiddu 10 年之前
父节点
当前提交
96ac163139
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/tm/t_append_branches.c

+ 1 - 1
modules/tm/t_append_branches.c

@@ -116,7 +116,7 @@ int t_append_branches(void) {
 										&bflags, &si, &ruid, &instance, &location_ua))) {
 										&bflags, &si, &ruid, &instance, &location_ua))) {
 		LM_DBG("Current uri %.*s\n",current_uri.len, current_uri.s);
 		LM_DBG("Current uri %.*s\n",current_uri.len, current_uri.s);
 
 
-		for (i=0; i<nr_branches; i++) {
+		for (i=0; i<=nr_branches; i++) {
 			if (t->uac[i].ruid.len == ruid.len
 			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)) {
 				LM_DBG("branch already added [%.*s]\n", ruid.len, ruid.s);
 				LM_DBG("branch already added [%.*s]\n", ruid.len, ruid.s);