diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-12 17:31:45 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-12 17:31:45 +0000 |
commit | 1b97e38c6bfb3e5ee7e33b47fb4c3d5a2fe6a0fa (patch) | |
tree | 101798d10656e80f94efc799148da716ec41f545 /apps/app_externalivr.c | |
parent | 205d533dc53823061938d98ff57d179f2093515a (diff) |
Merged revisions 7433,7435 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7433 | tilghman | 2005-12-12 11:19:29 -0600 (Mon, 12 Dec 2005) | 2 lines
Typo
........
r7435 | kpfleming | 2005-12-12 11:30:59 -0600 (Mon, 12 Dec 2005) | 2 lines
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
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7436 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_externalivr.c')
-rw-r--r-- | apps/app_externalivr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index 54b730b65..ad27c1659 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -345,8 +345,6 @@ static int app_exec(struct ast_channel *chan, void *data) 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; @@ -357,6 +355,10 @@ static int app_exec(struct ast_channel *chan, void *data) goto exit; } + setvbuf(child_events, NULL, _IONBF, 0); + setvbuf(child_commands, NULL, _IONBF, 0); + setvbuf(child_errors, NULL, _IONBF, 0); + res = 0; while (1) { |