[asterisk-commits] branch 1.2 - r7435
/branches/1.2/apps/app_externalivr.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Dec 12 11:30:59 CST 2005
Author: kpfleming
Date: Mon Dec 12 11:30:59 2005
New Revision: 7435
URL: http://svn.digium.com/view/asterisk?rev=7435&view=rev
Log:
set all the child file descriptors to non-blocking so that we don't hang if the child fails to send a newline-terminated command or error message
Modified:
branches/1.2/apps/app_externalivr.c
Modified: branches/1.2/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_externalivr.c?rev=7435&r1=7434&r2=7435&view=diff
==============================================================================
--- branches/1.2/apps/app_externalivr.c (original)
+++ branches/1.2/apps/app_externalivr.c Mon Dec 12 11:30:59 2005
@@ -345,8 +345,6 @@
goto exit;
}
- setvbuf(child_events, NULL, _IONBF, 0);
-
if (!(child_commands = fdopen(child_commands_fd, "r"))) {
ast_chan_log(LOG_WARNING, chan, "Could not open stream for child commands\n");
goto exit;
@@ -356,6 +354,10 @@
ast_chan_log(LOG_WARNING, chan, "Could not open stream for child errors\n");
goto exit;
}
+
+ setvbuf(child_events, NULL, _IONBF, 0);
+ setvbuf(child_commands, NULL, _IONBF, 0);
+ setvbuf(child_errors, NULL, _IONBF, 0);
res = 0;
More information about the asterisk-commits
mailing list