apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject svn commit: r349070 - /apr/apr/trunk/poll/unix/select.c
Date Sat, 26 Nov 2005 03:42:48 GMT
Author: brianp
Date: Fri Nov 25 19:42:46 2005
New Revision: 349070

URL: http://svn.apache.org/viewcvs?rev=349070&view=rev
Log:
Correctly compute number of signalled descriptors in the select(2)-based
implementation of apr_poll() when one or more descriptors has multiple
events (e.g., is both readable and writable).

Modified:
    apr/apr/trunk/poll/unix/select.c

Modified: apr/apr/trunk/poll/unix/select.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/poll/unix/select.c?rev=349070&r1=349069&r2=349070&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/select.c (original)
+++ apr/apr/trunk/poll/unix/select.c Fri Nov 25 19:42:46 2005
@@ -131,6 +131,7 @@
         return apr_get_netos_error();
     }
 
+    (*nsds) = 0;
     for (i = 0; i < num; i++) {
         apr_os_sock_t fd;
 
@@ -155,6 +156,9 @@
         }
         if (FD_ISSET(fd, &exceptset)) {
             aprset[i].rtnevents |= APR_POLLERR;
+        }
+        if (aprset[i].rtnevents) {
+            (*nsds)++;
         }
     }
 



Mime
View raw message