apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r932585 - in /apr/apr/trunk: include/arch/unix/apr_arch_poll_private.h poll/unix/pollset.c
Date Fri, 09 Apr 2010 20:34:24 GMT
Author: trawick
Date: Fri Apr  9 20:34:24 2010
New Revision: 932585

URL: http://svn.apache.org/viewvc?rev=932585&view=rev
Log:
fix misuse of autodata in initialization of the wakeup
pipe when the pollset was created with APR_POLLSET_NOCOPY

Submitted by: Neil Conway <nrc cs.berkeley.edu>
Reviewed by: trawick

Modified:
    apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h
    apr/apr/trunk/poll/unix/pollset.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?rev=932585&r1=932584&r2=932585&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h (original)
+++ apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h Fri Apr  9 20:34:24 2010
@@ -115,6 +115,7 @@ struct apr_pollset_t
     apr_uint32_t flags;
     /* Pipe descriptors used for wakeup */
     apr_file_t *wakeup_pipe[2];
+    apr_pollfd_t wakeup_pfd;
     apr_pollset_private_t *p;
     apr_pollset_provider_t *provider;
 };

Modified: apr/apr/trunk/poll/unix/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/pollset.c?rev=932585&r1=932584&r2=932585&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/pollset.c (original)
+++ apr/apr/trunk/poll/unix/pollset.c Fri Apr  9 20:34:24 2010
@@ -153,16 +153,14 @@ APR_DECLARE(apr_status_t) apr_pollset_cr
         pollset->provider = provider;
     }
     if (flags & APR_POLLSET_WAKEABLE) {
-        apr_pollfd_t pfd;
-
         /* Create wakeup pipe */
-        if ((rv = apr_poll_create_wakeup_pipe(pollset->pool, &pfd,
+        if ((rv = apr_poll_create_wakeup_pipe(pollset->pool, &pollset->wakeup_pfd,
                                               pollset->wakeup_pipe))
                 != APR_SUCCESS) {
             return rv;
         }
 
-        if ((rv = apr_pollset_add(pollset, &pfd)) != APR_SUCCESS) {
+        if ((rv = apr_pollset_add(pollset, &pollset->wakeup_pfd)) != APR_SUCCESS)
{
             return rv;
         }
     }



Mime
View raw message