[asterisk-commits] file: trunk r174543 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 10 09:37:07 CST 2009
Author: file
Date: Tue Feb 10 09:37:07 2009
New Revision: 174543
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=174543
Log:
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:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=174543&r1=174542&r2=174543
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Feb 10 09:37:07 2009
@@ -5230,9 +5230,11 @@
if (inuse) {
sip_pvt_lock(fup);
ao2_lock(p);
- 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;
}
@@ -5244,9 +5246,11 @@
if (inringing) {
sip_pvt_lock(fup);
ao2_lock(p);
- 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