[asterisk-commits] mmichelson: branch 1.6.0 r113837 - in /branches/1.6.0: ./ main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 9 12:50:01 CDT 2008


Author: mmichelson
Date: Wed Apr  9 12:50:00 2008
New Revision: 113837

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

........
r113836 | mmichelson | 2008-04-09 12:48:33 -0500 (Wed, 09 Apr 2008) | 14 lines

There was a subtle logical difference between 1.4 and trunk with regards to how timeouts
were handled. In 1.4, if the absolute timeout were reached on a call, no matter what
the return value of ast_spawn_extension was, the pbx would attempt to go to the 'T'
extension or hangup otherwise. The rearrangement of this function in trunk made this check
only happen in the case that ast_spawn_extension returned 0. If ast_spawn_extension returned
1, then the fact that the timeout expired resulted in a no-op, and would cause an infinite
loop to occur in __ast_pbx_run. This change fixes this problem. Now timeouts will
behave as they did in 1.4

(closes issue #11550)
Reported by: pj
Tested by: putnopvut


........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/pbx.c

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

Modified: branches/1.6.0/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/pbx.c?view=diff&rev=113837&r1=113836&r2=113837
==============================================================================
--- branches/1.6.0/main/pbx.c (original)
+++ branches/1.6.0/main/pbx.c Wed Apr  9 12:50:00 2008
@@ -3499,8 +3499,12 @@
 				if (c->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
 					c->_softhangup = 0;
 					continue;
-				} else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT) {
-					/* atimeout, nothing bad */
+				} else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT && ast_exists_extension(c, c->context, "T", 1, c->cid.cid_num)) {
+					set_ext_pri(c, "T", 1); 
+					/* If the AbsoluteTimeout is not reset to 0, we'll get an infinite loop */
+					c->whentohangup = 0;
+					c->_softhangup &= ~AST_SOFTHANGUP_TIMEOUT;
+					continue;
 				} else {
 					if (c->cdr)
 						ast_cdr_update(c);




More information about the asterisk-commits mailing list