Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 50393 invoked from network); 21 Feb 2009 20:46:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2009 20:46:50 -0000 Received: (qmail 90976 invoked by uid 500); 21 Feb 2009 20:46:50 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 90944 invoked by uid 500); 21 Feb 2009 20:46:50 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 90935 invoked by uid 99); 21 Feb 2009 20:46:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Feb 2009 12:46:50 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Feb 2009 20:46:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 03C332388882; Sat, 21 Feb 2009 20:46:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r746588 - /apr/apr/trunk/poll/unix/epoll.c Date: Sat, 21 Feb 2009 20:46:27 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090221204628.03C332388882@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);