[asterisk-commits] file: branch 1.6.0 r174544 - in /branches/1.6.0: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 10 09:39:00 CST 2009


Author: file
Date: Tue Feb 10 09:39:00 2009
New Revision: 174544

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

........
  r174543 | file | 2009-02-10 11:37:07 -0400 (Tue, 10 Feb 2009) | 6 lines
  
  Make the logic for inuse and inringing manipluation match that of 1.4. The old broken logic would reset the values back to 0 during certain scenarios causing the wrong state to be reported.
  (closes issue #14399)
  Reported by: caspy
  (issue #13238)
  Reported by: kowalma
........

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

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

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=174544&r1=174543&r2=174544
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Tue Feb 10 09:39:00 2009
@@ -4556,9 +4556,11 @@
 		if (inuse) {
 			sip_pvt_lock(fup);
 			ast_mutex_lock(pu_lock);
-			if ((*inuse > 0) && ast_test_flag(&fup->flags[0], SIP_INC_COUNT)) {
-				(*inuse)--;
-				ast_clear_flag(&fup->flags[0], SIP_INC_COUNT);
+			if (*inuse > 0) {
+				if (ast_test_flag(&fup->flags[0], SIP_INC_COUNT)) {
+					(*inuse)--;
+					ast_clear_flag(&fup->flags[0], SIP_INC_COUNT);
+				}
 			} else {
 				*inuse = 0;
 			}
@@ -4570,9 +4572,11 @@
 		if (inringing) {
 			sip_pvt_lock(fup);
 			ast_mutex_lock(pu_lock);
-			if ((*inringing > 0)&& ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) {
-				(*inringing)--;
-				ast_clear_flag(&fup->flags[0], SIP_INC_RINGING);
+			if (*inringing > 0) {
+				if (ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) {
+					(*inringing)--;
+					ast_clear_flag(&fup->flags[0], SIP_INC_RINGING);
+				}
 			} else {
 			   *inringing = 0;
 			}




More information about the asterisk-commits mailing list