Module: sip-router Branch: 4.1 Commit: f32354f9aae3afadca98e5a1cf254d9286a3a985 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f32354f9...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Apr 23 22:12:48 2014 +0200
tm: reset local lock reply status after functions that do unlock
(cherry picked from commit 5943a8005baf8ce1239d2cf728373cb26975483a)
---
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; }