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

Modified Files:
        channel.c 
Log Message:
Fix timeout > 600000 on Linux x86-32


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -d -r1.250 -r1.251
--- channel.c   17 Oct 2005 15:41:55 -0000      1.250
+++ channel.c   20 Oct 2005 22:45:47 -0000      1.251
@@ -1325,7 +1325,20 @@
        }
        if (*ms > 0) 
                start = ast_tvnow();
-       res = poll(pfds, max, rms);
+       
+       if (sizeof(int) == 4) {
+               do {
+                       int kbrms = rms;
+                       if (kbrms > 600000)
+                               kbrms = 600000;
+                       res = poll(pfds, max, kbrms);
+                       if (!res)
+                               rms -= kbrms;
+               } while (!res && (rms > 0));
+       } else {
+               res = poll(pfds, max, rms);
+       }
+       
        if (res < 0) {
                for (x=0; x < n; x++) 
                        ast_clear_flag(c[x], AST_FLAG_BLOCKING);

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

Reply via email to