[asterisk-commits] file: trunk r42149 - in /trunk: ./ res/res_agi.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Sep 6 13:04:18 MST 2006


Author: file
Date: Wed Sep  6 15:04:17 2006
New Revision: 42149

URL: http://svn.digium.com/view/asterisk?rev=42149&view=rev
Log:
Merged revisions 42148 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42148 | file | 2006-09-06 16:02:59 -0400 (Wed, 06 Sep 2006) | 2 lines

Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999)

........

Modified:
    trunk/   (props changed)
    trunk/res/res_agi.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?rev=42149&r1=42148&r2=42149&view=diff
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Wed Sep  6 15:04:17 2006
@@ -2023,7 +2023,8 @@
 		/* If the fork'd process returns non-zero, set AGISTATUS to FAILURE */
 		if (res == AGI_RESULT_SUCCESS && status)
 			res = AGI_RESULT_FAILURE;
-		close(fds[1]);
+		if (fds[1] != fds[0])
+			close(fds[1]);
 		if (efd > -1)
 			close(efd);
 		ast_unreplace_sigchld();



More information about the asterisk-commits mailing list