From commits-return-9955-apmail-apr-commits-archive=apr.apache.org@apr.apache.org Thu Aug 28 17:09:29 2008 Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 28384 invoked from network); 28 Aug 2008 17:09:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Aug 2008 17:09:28 -0000 Received: (qmail 37473 invoked by uid 500); 28 Aug 2008 17:09:27 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 37437 invoked by uid 500); 28 Aug 2008 17:09:26 -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 37428 invoked by uid 99); 28 Aug 2008 17:09:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2008 10:09:26 -0700 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; Thu, 28 Aug 2008 17:08:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D2D9F238896B; Thu, 28 Aug 2008 10:09:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r689896 - in /apr/apr/trunk: CHANGES poll/unix/select.c Date: Thu, 28 Aug 2008 17:09:07 -0000 To: commits@apr.apache.org From: jerenkrantz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080828170907.D2D9F238896B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jerenkrantz Date: Thu Aug 28 10:09:06 2008 New Revision: 689896 URL: http://svn.apache.org/viewvc?rev=689896&view=rev Log: Win32: Do not error out on apr_pollset_poll() when there are no sockets. * poll/unix/select.c (apr_pollset_poll): On Win32, short-circuit success if we have no sockets instead of returning an error. * CHANGES: Update. Modified: apr/apr/trunk/CHANGES apr/apr/trunk/poll/unix/select.c Modified: apr/apr/trunk/CHANGES URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=689896&r1=689895&r2=689896&view=diff ============================================================================== --- apr/apr/trunk/CHANGES [utf-8] (original) +++ apr/apr/trunk/CHANGES [utf-8] Thu Aug 28 10:09:06 2008 @@ -1,5 +1,9 @@ -*- coding: utf-8 -*- Changes for APR 1.4.0 + + *) Win32: Do not error out on apr_pollset_poll() when there are no sockets. + [Justin Erenkrantz] + *) Intruduce apr_hash_do for iterating over a hash table. [Mladen Turk] Modified: apr/apr/trunk/poll/unix/select.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/select.c?rev=689896&r1=689895&r2=689896&view=diff ============================================================================== --- apr/apr/trunk/poll/unix/select.c (original) +++ apr/apr/trunk/poll/unix/select.c Thu Aug 28 10:09:06 2008 @@ -453,6 +453,17 @@ fd_set readset, writeset, exceptset; apr_status_t rv = APR_SUCCESS; +#ifdef WIN32 + /* On Win32, select() must be presented with at least one socket to + * poll on, or select() will return WSAEINVAL. So, we'll just + * short-circuit and bail now. + */ + if (pollset->nelts == 0) { + (*num) = 0; + return APR_SUCCESS; + } +#endif + if (timeout < 0) { tvptr = NULL; }