You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2009/02/21 21:46:27 UTC

svn commit: r746588 - /apr/apr/trunk/poll/unix/epoll.c

Author: trawick
Date: Sat Feb 21 20:46:27 2009
New Revision: 746588

URL: http://svn.apache.org/viewvc?rev=746588&view=rev
Log:
don't go to any trouble to compute the ignored epoll_event
parameter to epoll_ctl(EPOLL_CTL_DEL)

(beyond the pathlength, it also is helpful to understand
if the events specified by the caller are critical or
ignored)

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

Modified: apr/apr/trunk/poll/unix/epoll.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/epoll.c?rev=746588&r1=746587&r2=746588&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/epoll.c (original)
+++ apr/apr/trunk/poll/unix/epoll.c Sat Feb 21 20:46:27 2009
@@ -190,11 +190,11 @@
 {
     pfd_elem_t *ep;
     apr_status_t rv = APR_SUCCESS;
-    struct epoll_event ev;
+    struct epoll_event ev = {0}; /* ignored, but must be passed with
+                                  * kernel < 2.6.9
+                                  */
     int ret = -1;
 
-    ev.events = get_epoll_event(descriptor->reqevents);
-
     if (descriptor->desc_type == APR_POLL_SOCKET) {
         ret = epoll_ctl(pollset->p->epoll_fd, EPOLL_CTL_DEL,
                         descriptor->desc.s->socketdes, &ev);
@@ -381,11 +381,11 @@
                                        apr_pollfd_t *descriptor)
 {
     apr_status_t rv = APR_SUCCESS;
-    struct epoll_event ev;
+    struct epoll_event ev = {0}; /* ignored, but must be passed with
+                                  * kernel < 2.6.9
+                                  */
     int ret = -1;
     
-    ev.events = get_epoll_event(descriptor->reqevents);
-    
     if (descriptor->desc_type == APR_POLL_SOCKET) {
         ret = epoll_ctl(pollcb->fd, EPOLL_CTL_DEL,
                         descriptor->desc.s->socketdes, &ev);