aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-12 02:42:48 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-12 02:42:48 +0000
commit00299cafa7562e7484a6418b6a06fb86c0198056 (patch)
treecb521eb561611cdba2bd933a59c05f8e696e43db /channel.c
parente163d7d333cb5145182bc46d9b8cd41201e67b87 (diff)
initialize errno and don't report an error when poll() returns without indicating one (bug #4059)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@5635 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 92d9e31b5..f88dcf73b 100755
--- a/channel.c
+++ b/channel.c
@@ -1144,9 +1144,10 @@ char ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd
return -1;
/* Wait for a digit, no more than ms milliseconds total. */
while(ms) {
+ errno = 0;
rchan = ast_waitfor_nandfds(&c, 1, &cmdfd, (cmdfd > -1) ? 1 : 0, NULL, &outfd, &ms);
if ((!rchan) && (outfd < 0) && (ms)) {
- if (errno == EINTR)
+ if (errno == 0 || errno == EINTR)
continue;
ast_log(LOG_WARNING, "Wait failed (%s)\n", strerror(errno));
return -1;