[asterisk-commits] rmudgett: trunk r313701 - in /trunk: ./ res/res_agi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 13 17:54:12 CDT 2011
Author: rmudgett
Date: Wed Apr 13 17:54:08 2011
New Revision: 313701
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=313701
Log:
Merged revisions 313700 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r313700 | rmudgett | 2011-04-13 17:52:47 -0500 (Wed, 13 Apr 2011) | 5 lines
Revert flushing stale AsyncAGI commands from -r313615.
It looks like it was intentional to leave any commands or in-flight
commands in the queue in case Async AGI is run again on the call.
........
Modified:
trunk/ (props changed)
trunk/res/res_agi.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_agi.c?view=diff&rev=313701&r1=313700&r2=313701
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Wed Apr 13 17:54:08 2011
@@ -1225,19 +1225,16 @@
return AGI_RESULT_FAILURE;
}
- /* Flush any stale commands. */
- while ((cmd = get_agi_cmd(chan))) {
- free_agi_cmd(cmd);
- }
-
/* this pipe allows us to create a "fake" AGI struct to use
the AGI commands */
res = pipe(fds);
if (res) {
ast_log(LOG_ERROR, "Failed to create Async AGI pipe\n");
- /* intentionally do not remove datastore, added with
- add_to_agi(), from channel. It will be removed when
- the channel is hung up anyways */
+ /*
+ * Intentionally do not remove the datastore added with
+ * add_to_agi() the from channel. It will be removed when the
+ * channel is hung up anyway.
+ */
return AGI_RESULT_FAILURE;
}
@@ -1341,9 +1338,13 @@
close(fds[0]);
close(fds[1]);
- /* intentionally don't get rid of the datastore. So commands can be
- still in the queue in case AsyncAGI gets called again.
- Datastore destructor will be called on channel destroy anyway */
+ /*
+ * Intentionally do not remove the datastore added with
+ * add_to_agi() the from channel. There might be commands still
+ * in the queue or in-flight to us and AsyncAGI may get called
+ * again. The datastore destructor will be called on channel
+ * destruction anyway.
+ */
return returnstatus;
More information about the asterisk-commits
mailing list