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

Modified Files:
      Tag: v1-0
        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.139.2.7
retrieving revision 1.139.2.8
diff -u -d -r1.139.2.7 -r1.139.2.8
--- channel.c   10 May 2005 03:28:01 -0000      1.139.2.7
+++ channel.c   12 May 2005 02:42:48 -0000      1.139.2.8
@@ -1144,9 +1144,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