[asterisk-commits] jpeeler: branch 1.6.0 r231096 - in /branches/1.6.0: ./ main/features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 24 12:53:47 CST 2009
Author: jpeeler
Date: Tue Nov 24 12:53:44 2009
New Revision: 231096
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=231096
Log:
Merged revisions 231095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r231095 | jpeeler | 2009-11-24 12:50:36 -0600 (Tue, 24 Nov 2009) | 11 lines
Fix erroneous hangup extension execution
ast_spawn_extension behaves differently from 1.4 in that hangups and extensions
that do not exist do not return an error, whereas in 1.6 it does. This is now
taken into account so that the AST_FLAG_BRIDGE_HANGUP_RUN flag gets set
properly.
(closes issue #16106)
Reported by: ajohnson
Tested by: ajohnson
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/main/features.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/main/features.c?view=diff&rev=231096&r1=231095&r2=231096
==============================================================================
--- branches/1.6.0/main/features.c (original)
+++ branches/1.6.0/main/features.c Tue Nov 24 12:53:44 2009
@@ -2555,6 +2555,10 @@
while ((spawn_error = ast_spawn_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num, &found, 1)) == 0) {
chan->priority++;
}
+ if (spawn_error && (!ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num) || ast_check_hangup(chan))) {
+ /* if the extension doesn't exist or a hangup occurred, this isn't really a spawn error */
+ spawn_error = 0;
+ }
if (found && spawn_error) {
/* Something bad happened, or a hangup has been requested. */
ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", chan->context, chan->exten, chan->priority, chan->name);
@@ -2571,7 +2575,7 @@
bridge_cdr = NULL;
}
}
- if (chan->priority != 1 || !spawn_error) {
+ if (!spawn_error) {
ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_RUN);
}
ast_channel_unlock(chan);
More information about the asterisk-commits
mailing list