You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by sf...@apache.org on 2012/05/28 15:05:09 UTC

svn commit: r1343234 - in /apr/apr/branches/1.5.x: ./ network_io/unix/sockaddr.c

Author: sf
Date: Mon May 28 13:05:08 2012
New Revision: 1343234

URL: http://svn.apache.org/viewvc?rev=1343234&view=rev
Log:
Merge r1341196:
If we retry getaddrinfo() without AI_ADDRCONFIG, we should really only remove
AI_ADDRCONFIG and not all flags.

When the retry logic was added in r64571, this was equivalent because not
other flags were set. But this has changed since then.


Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/network_io/unix/sockaddr.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1341196

Modified: apr/apr/branches/1.5.x/network_io/unix/sockaddr.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/network_io/unix/sockaddr.c?rev=1343234&r1=1343233&r2=1343234&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/network_io/unix/sockaddr.c (original)
+++ apr/apr/branches/1.5.x/network_io/unix/sockaddr.c Mon May 28 13:05:08 2012
@@ -357,8 +357,8 @@ static apr_status_t call_resolver(apr_so
     error = getaddrinfo(hostname, servname, &hints, &ai_list);
 #ifdef HAVE_GAI_ADDRCONFIG
     if (error == EAI_BADFLAGS && family == APR_UNSPEC) {
-        /* Retry with no flags if AI_ADDRCONFIG was rejected. */
-        hints.ai_flags = 0;
+        /* Retry without AI_ADDRCONFIG if it was rejected. */
+        hints.ai_flags &= ~AI_ADDRCONFIG;
         error = getaddrinfo(hostname, servname, &hints, &ai_list);
     }
 #endif