[asterisk-commits] tilghman: trunk r114196 - in /trunk: ./ res/res_agi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 17 07:59:04 CDT 2008
Author: tilghman
Date: Thu Apr 17 07:59:04 2008
New Revision: 114196
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114196
Log:
Merged revisions 114195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r114195 | tilghman | 2008-04-17 07:56:38 -0500 (Thu, 17 Apr 2008) | 8 lines
Add special case for when the agi cannot be executed, to comply with the documentation that
we return failure in that case.
(closes issue #12462)
Reported by: fmueller
Patches:
20080416__bug12462.diff.txt uploaded by Corydon76 (license 14)
Tested by: fmueller
........
Modified:
trunk/ (props changed)
trunk/res/res_agi.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?view=diff&rev=114196&r1=114195&r2=114196
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Thu Apr 17 07:59:04 2008
@@ -693,6 +693,8 @@
execv(script, argv);
/* Can't use ast_log since FD's are closed */
ast_child_verbose(1, "Failed to execute '%s': %s", script, strerror(errno));
+ /* Special case to set status of AGI to failure */
+ fprintf(stdout, "failure\n");
fflush(stdout);
_exit(1);
}
@@ -2646,6 +2648,12 @@
break;
}
+ /* Special case for inability to execute child process */
+ if (*buf && strncasecmp(buf, "failure", 7) == 0) {
+ returnstatus = AGI_RESULT_FAILURE;
+ break;
+ }
+
/* get rid of trailing newline, if any */
if (*buf && buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) - 1] = 0;
More information about the asterisk-commits
mailing list