[asterisk-commits] tilghman: trunk r117431 - /trunk/apps/app_externalivr.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 21 08:39:43 CDT 2008
Author: tilghman
Date: Wed May 21 08:39:41 2008
New Revision: 117431
URL: http://svn.digium.com/view/asterisk?view=rev&rev=117431
Log:
On socket-based connections, there is no error FD, so don't try waiting on one.
(closes issue #12697)
Reported by: ctooley
Patches:
fix_externalivr_waitfor_nandfds-v3.diff uploaded by ctooley (license 136)
Modified:
trunk/apps/app_externalivr.c
Modified: trunk/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_externalivr.c?view=diff&rev=117431&r1=117430&r2=117431
==============================================================================
--- trunk/apps/app_externalivr.c (original)
+++ trunk/apps/app_externalivr.c Wed May 21 08:39:41 2008
@@ -379,7 +379,7 @@
if (!ser) {
goto exit;
}
- res = eivr_comm(chan, u, ser->fd, ser->fd, 0, pipe_delim_argbuf);
+ res = eivr_comm(chan, u, ser->fd, ser->fd, -1, pipe_delim_argbuf);
} else {
if (pipe(child_stdin)) {
@@ -495,7 +495,7 @@
ast_chan_log(LOG_WARNING, chan, "Could not open stream to receive commands\n");
goto exit;
}
- if(eivr_errors_fd) { /* if opening a socket connection, error stream will not be used */
+ if (eivr_errors_fd > -1) { /* if opening a socket connection, error stream will not be used */
if (!(eivr_errors = fdopen(eivr_errors_fd, "r"))) {
ast_chan_log(LOG_WARNING, chan, "Could not open stream to receive errors\n");
goto exit;
@@ -529,7 +529,7 @@
errno = 0;
exception = 0;
- rchan = ast_waitfor_nandfds(&chan, 1, waitfds, 2, &exception, &ready_fd, &ms);
+ rchan = ast_waitfor_nandfds(&chan, 1, waitfds, (eivr_errors_fd < 0) ? 1 : 2, &exception, &ready_fd, &ms);
if (!AST_LIST_EMPTY(&u->finishlist)) {
AST_LIST_LOCK(&u->finishlist);
More information about the asterisk-commits
mailing list