apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1343234 - in /apr/apr/branches/1.5.x: ./ network_io/unix/sockaddr.c
Date Mon, 28 May 2012 13:05:09 GMT
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



Mime
View raw message