[sr-dev] git:master: tm: reset local lock reply status after functions that do unlock

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 23 23:11:32 CEST 2014


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Apr 23 22:12:48 2014 +0200

tm: reset local lock reply status after functions that do unlock

---

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

diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 2070d9d..8e435cb 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -2480,6 +2480,7 @@ int reply_received( struct sip_msg  *p_msg )
 	}
 	if ( is_local(t) ) {
 		reply_status=local_reply( t, p_msg, branch, msg_status, &cancel_data );
+		replies_locked=0;
 		if (reply_status == RPS_COMPLETED) {
 			     /* no more UAC FR/RETR (if I received a 2xx, there may
 			      * be still pending branches ...
@@ -2497,6 +2498,7 @@ int reply_received( struct sip_msg  *p_msg )
 	} else {
 		reply_status=relay_reply( t, p_msg, branch, msg_status,
 									&cancel_data, 1 );
+		replies_locked=0;
 		if (reply_status == RPS_COMPLETED) {
 			     /* no more UAC FR/RETR (if I received a 2xx, there may
 				be still pending branches ...
@@ -2534,7 +2536,8 @@ int reply_received( struct sip_msg  *p_msg )
 skip_send_reply:
 
 	if (likely(replies_locked)){
-		UNLOCK_REPLIES(t); /* unlock replies  - this would be unlocked by send function*/
+		/* unlock replies if still locked coming via goto skip_send_reply */
+		UNLOCK_REPLIES(t);
 		replies_locked=0;
 	}
 




More information about the sr-dev mailing list