apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r789066 - /apr/apr/trunk/poll/unix/pollcb.c
Date Sun, 28 Jun 2009 08:17:42 GMT
Author: pquerna
Date: Sun Jun 28 08:17:42 2009
New Revision: 789066

URL: http://svn.apache.org/viewvc?rev=789066&view=rev
Log:
If APR_POLLSET_NODEFAULT is specified, never ever fallback to the default.

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

Modified: apr/apr/trunk/poll/unix/pollcb.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/pollcb.c?rev=789066&r1=789065&r2=789066&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/pollcb.c (original)
+++ apr/apr/trunk/poll/unix/pollcb.c Sun Jun 28 08:17:42 2009
@@ -103,19 +103,22 @@
 
     rv = (*provider->create)(*pollcb, size, p, flags);
     if (rv == APR_ENOTIMPL) {
+        *pollcb = NULL;
         if (method == pollset_default_method) {
-            *pollcb = NULL;
             return rv;
         }
+
+        if ((flags & APR_POLLSET_NODEFAULT) == APR_POLLSET_NODEFAULT) {
+            return rv;
+        }
+
         /* Try with default provider */
         provider = pollcb_provider(pollset_default_method);
         if (!provider) {
-            *pollcb = NULL;
             return APR_ENOTIMPL;
         }
         rv = (*provider->create)(*pollcb, size, p, flags);
         if (rv != APR_SUCCESS) {
-            *pollcb = NULL;
             return rv;
         }
         (*pollcb)->provider = provider;



Mime
View raw message