apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject svn commit: r501085 - in /apr/apr/trunk: include/arch/unix/apr_arch_poll_private.h poll/unix/epoll.c
Date Mon, 29 Jan 2007 15:56:42 GMT
Author: gregames
Date: Mon Jan 29 07:56:41 2007
New Revision: 501085

URL: http://svn.apache.org/viewvc?view=rev&rev=501085
Log:
reverting rev 500321 pending investigation of problem reported by jorton.  

This line, and those below, will be ignored--

M    include/arch/unix/apr_arch_poll_private.h
M    poll/unix/epoll.c

Modified:
    apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h
    apr/apr/trunk/poll/unix/epoll.c

Modified: apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h?view=diff&rev=501085&r1=501084&r2=501085
==============================================================================
--- apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h (original)
+++ apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h Mon Jan 29 07:56:41 2007
@@ -91,8 +91,8 @@
 typedef struct pfd_elem_t pfd_elem_t;
 
 struct pfd_elem_t {
-    apr_pollfd_t pfd;
     APR_RING_ENTRY(pfd_elem_t) link;
+    apr_pollfd_t pfd;
 };
 
 #endif

Modified: apr/apr/trunk/poll/unix/epoll.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/epoll.c?view=diff&rev=501085&r1=501084&r2=501085
==============================================================================
--- apr/apr/trunk/poll/unix/epoll.c (original)
+++ apr/apr/trunk/poll/unix/epoll.c Mon Jan 29 07:56:41 2007
@@ -219,10 +219,18 @@
         pollset_lock_rings();
 
         if (!APR_RING_EMPTY(&(pollset->query_ring), pfd_elem_t, link)) {
-            ep = (pfd_elem_t *) descriptor;
+            for (ep = APR_RING_FIRST(&(pollset->query_ring));
+                 ep != APR_RING_SENTINEL(&(pollset->query_ring),
+                                         pfd_elem_t, link);
+                 ep = APR_RING_NEXT(ep, link)) {
                 
-            APR_RING_REMOVE(ep, link);
-            APR_RING_INSERT_TAIL(&(pollset->dead_ring), ep, pfd_elem_t, link);
+                if (descriptor->desc.s == ep->pfd.desc.s) {
+                    APR_RING_REMOVE(ep, link);
+                    APR_RING_INSERT_TAIL(&(pollset->dead_ring),
+                                         ep, pfd_elem_t, link);
+                    break;
+                }
+            }
         }
 
         pollset_unlock_rings();



Mime
View raw message