[svn-commits] mmichelson: branch 1.6.1 r148375 - in /branches/1.6.1: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Oct 10 16:19:33 CDT 2008


Author: mmichelson
Date: Fri Oct 10 16:19:33 2008
New Revision: 148375

URL: http://svn.digium.com/view/asterisk?view=rev&rev=148375
Log:
Merged revisions 148373 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r148373 | mmichelson | 2008-10-10 16:18:10 -0500 (Fri, 10 Oct 2008) | 8 lines

Make sure that the inUse and inRinging fields for 
a sip peer cannot go below zero. This is a regression
from 1.4 and so it will be applied to 1.6.0 as well.

(closes issue #13668)
Reported by: mjc


........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=148375&r1=148374&r2=148375
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Fri Oct 10 16:19:33 2008
@@ -4691,13 +4691,13 @@
 	/* incoming and outgoing affects the inUse counter */
 	case DEC_CALL_LIMIT:
 		/* Decrement inuse count if applicable */
-		if (inuse && ast_test_flag(&fup->flags[0], SIP_INC_COUNT)) {
+		if (inuse && *inuse > 0 && ast_test_flag(&fup->flags[0], SIP_INC_COUNT)) {
 			ast_atomic_fetchadd_int(inuse, -1);
 			ast_clear_flag(&fup->flags[0], SIP_INC_COUNT);
 		} else
 			*inuse = 0;
 		/* Decrement ringing count if applicable */
-		if (inringing && ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) {
+		if (inringing && *inringing > 0 && ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) {
 			ast_atomic_fetchadd_int(inringing, -1);
 			ast_clear_flag(&fup->flags[0], SIP_INC_RINGING);
 		}
@@ -4735,7 +4735,7 @@
 		break;
 
 	case DEC_CALL_RINGING:
-		if (inringing && ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) {
+		if (inringing && *inringing > 0 && ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) {
 			ast_atomic_fetchadd_int(inringing, -1);
 			ast_clear_flag(&fup->flags[0], SIP_INC_RINGING);
 		}




More information about the svn-commits mailing list