summaryrefslogtreecommitdiff
path: root/poll/unix/pollset.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2009-11-14 03:06:45 +0000
committerJeff Trawick <trawick@apache.org>2009-11-14 03:06:45 +0000
commitdc83007ad303eb823e73b328127e746b66298d3e (patch)
tree7af46a5ba6cb6270a5b1a12615f1ea55861161dc /poll/unix/pollset.c
parent705b13f41d107aafef12a62f0ec27ade50cbf670 (diff)
downloadapr-dc83007ad303eb823e73b328127e746b66298d3e.tar.gz
merge r834040 from trunk:
fix special poll() processing on Win32 to be consistent between . apr_{pollset|pollcb}_create_ex(..., APR_POLLSET_DEFAULT) and . apr_{pollset|pollcb}_create(...) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@836107 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll/unix/pollset.c')
-rw-r--r--poll/unix/pollset.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/poll/unix/pollset.c b/poll/unix/pollset.c
index 049509f40..5ad70c994 100644
--- a/poll/unix/pollset.c
+++ b/poll/unix/pollset.c
@@ -222,6 +222,17 @@ APR_DECLARE(apr_status_t) apr_pollset_create_ex(apr_pollset_t **ret_pollset,
*ret_pollset = NULL;
+ #ifdef WIN32
+ /* Favor WSAPoll if supported.
+ * This will work only if ws2_32.dll has WSAPoll funtion.
+ * In other cases it will fall back to select() method unless
+ * the APR_POLLSET_NODEFAULT is added to the flags.
+ */
+ if (method == APR_POLLSET_DEFAULT) {
+ method = APR_POLLSET_POLL;
+ }
+ #endif
+
if (method == APR_POLLSET_DEFAULT)
method = pollset_default_method;
while (provider == NULL) {
@@ -297,14 +308,6 @@ APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset,
apr_uint32_t flags)
{
apr_pollset_method_e method = APR_POLLSET_DEFAULT;
- #ifdef WIN32
- /* Favor WSAPoll if supported.
- * This will work only if ws2_32.dll has WSAPoll funtion.
- * In other cases it will fall back to select() method unless
- * the APR_POLLSET_NODEFAULT is added to the flags.
- */
- method = APR_POLLSET_POLL;
- #endif
return apr_pollset_create_ex(pollset, size, p, flags, method);
}