Skip to content
Snippets Groups Projects
Commit ff47b7ec authored by Mark Spencer's avatar Mark Spencer
Browse files

Make sure that waitfordigit_full doesn't hangup on -EINTR (bug #3831)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent e93e62e2
Branches
Tags
No related merge requests found
...@@ -1173,6 +1173,8 @@ char ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd ...@@ -1173,6 +1173,8 @@ char ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd
while(ms) { while(ms) {
rchan = ast_waitfor_nandfds(&c, 1, &cmdfd, (cmdfd > -1) ? 1 : 0, NULL, &outfd, &ms); rchan = ast_waitfor_nandfds(&c, 1, &cmdfd, (cmdfd > -1) ? 1 : 0, NULL, &outfd, &ms);
if ((!rchan) && (outfd < 0) && (ms)) { if ((!rchan) && (outfd < 0) && (ms)) {
if (errno == EINTR)
continue;
ast_log(LOG_WARNING, "Wait failed (%s)\n", strerror(errno)); ast_log(LOG_WARNING, "Wait failed (%s)\n", strerror(errno));
return -1; return -1;
} else if (outfd > -1) { } else if (outfd > -1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment