apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r202460 - in /apr/apr/trunk: CHANGES poll/unix/port.c
Date Thu, 30 Jun 2005 00:56:40 GMT
Author: pquerna
Date: Wed Jun 29 17:56:39 2005
New Revision: 202460

URL: http://svn.apache.org/viewcvs?rev=202460&view=rev
Log:
Fix corruption of the pollset rings on Solaris 10. A pfd_elem_t was being inserted into a
new ring without being removed first, corrupting the source ring.

Found and tested in the httpd zone on Helios.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/poll/unix/port.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/CHANGES?rev=202460&r1=202459&r2=202460&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES (original)
+++ apr/apr/trunk/CHANGES Wed Jun 29 17:56:39 2005
@@ -1,5 +1,7 @@
 Changes for APR 1.2.0
 
+  *) Fix Pollset corruption on Solaris 10. [Paul Querna]
+
   *) Add %pt support to apr_snprintf() for printing an apr_os_thread_t
      in hex format.  [Jeff Trawick]
 

Modified: apr/apr/trunk/poll/unix/port.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/poll/unix/port.c?rev=202460&r1=202459&r2=202460&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/port.c (original)
+++ apr/apr/trunk/poll/unix/port.c Wed Jun 29 17:56:39 2005
@@ -282,6 +282,8 @@
         port_associate(pollset->port_fd, PORT_SOURCE_FD, 
                            fd, get_event(ep->pfd.reqevents), ep);
 
+        APR_RING_INSERT_TAIL(&(pollset->query_ring), ep, pfd_elem_t, link);
+
     }
 
     pollset_unlock_rings();
@@ -312,6 +314,8 @@
                 (((pfd_elem_t*)(pollset->port_set[i].portev_user))->pfd);
             pollset->result_set[i].rtnevents =
                 get_revent(pollset->port_set[i].portev_events);
+
+            APR_RING_REMOVE((pfd_elem_t*)pollset->port_set[i].portev_user, link);
 
             APR_RING_INSERT_TAIL(&(pollset->add_ring), 
                                  (pfd_elem_t*)pollset->port_set[i].portev_user,



Mime
View raw message