[sr-dev] git:master: tm: t_pick_branch() cannot ingnore the pending blined UACs

Miklos Tirpak miklos at iptel.org
Thu Feb 10 14:54:13 CET 2011


Module: sip-router
Branch: master
Commit: 17fc9913737cf3314d317d9b62cfd3dc05f8376e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=17fc9913737cf3314d317d9b62cfd3dc05f8376e

Author: Miklos Tirpak <miklos at iptel.org>
Committer: Miklos Tirpak <miklos at iptel.org>
Date:   Thu Feb 10 14:26:14 2011 +0100

tm: t_pick_branch() cannot ingnore the pending blined UACs

Empty branches shall be considered pending branches
before their final response is set.
When all the responses were dropped in failure route and a new
blind UAC was added, t_pick_branch() did not realize that
there is still at least one pending branch, it returned an error
instead. Later on, the blind UAC was tried to be canceled causing
deadlock.

---

 modules/tm/t_reply.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index c18c716..e65d1b9 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -1042,8 +1042,11 @@ int t_pick_branch(int inc_branch, int inc_code, struct cell *t, int *res_code)
 			}
 			continue;
 		}
-		/* skip 'empty branches' */
-		if (!t->uac[b].request.buffer) continue;
+		/* skip 'empty branches'
+		 * An empty branch without a final response is still considered
+		 * to be a pending, incomplete branch. */
+		if ((!t->uac[b].request.buffer) && (t->uac[b].last_received>=200))
+			continue;
 		/* there is still an unfinished UAC transaction; wait now! */
 		if ( t->uac[b].last_received<200 )
 			return -2;




More information about the sr-dev mailing list