[asterisk-commits] file: branch 1.2 r42148 -
/branches/1.2/res/res_agi.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Sep 6 13:02:59 MST 2006
Author: file
Date: Wed Sep 6 15:02:59 2006
New Revision: 42148
URL: http://svn.digium.com/view/asterisk?rev=42148&view=rev
Log:
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:
branches/1.2/res/res_agi.c
Modified: branches/1.2/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/res/res_agi.c?rev=42148&r1=42147&r2=42148&view=diff
==============================================================================
--- branches/1.2/res/res_agi.c (original)
+++ branches/1.2/res/res_agi.c Wed Sep 6 15:02:59 2006
@@ -2047,7 +2047,8 @@
agi.ctrl = fds[0];
agi.audio = efd;
res = run_agi(chan, argv[0], &agi, pid, dead);
- close(fds[1]);
+ if (fds[1] != fds[0])
+ close(fds[1]);
if (efd > -1)
close(efd);
}
More information about the asterisk-commits
mailing list