diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-22 01:40:23 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-04-22 01:40:23 +0000 |
commit | 680a9198c73d177c658374122bb80854fd66f639 (patch) | |
tree | 5da5096a23fdca1550fd67fd3aaa9ee8b411260a | |
parent | bef71744f4685c36a2c2db1af2d9d97a1abca305 (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/trunk@5492 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1251,9 +1251,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; |