Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv12538

Modified Files:
        channel.c 
Log Message:
initialize errno and don't report an error when poll() returns without 
indicating one (bug #4059)


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -d -r1.189 -r1.190
--- channel.c   21 Apr 2005 06:02:43 -0000      1.189
+++ channel.c   22 Apr 2005 01:40:23 -0000      1.190
@@ -1251,9 +1251,10 @@
                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;

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to