apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1341196 - /apr/apr/trunk/network_io/unix/sockaddr.c
Date Mon, 21 May 2012 20:38:42 GMT
Author: sf
Date: Mon May 21 20:38:41 2012
New Revision: 1341196

URL: http://svn.apache.org/viewvc?rev=1341196&view=rev
Log:
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/trunk/network_io/unix/sockaddr.c

Modified: apr/apr/trunk/network_io/unix/sockaddr.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/sockaddr.c?rev=1341196&r1=1341195&r2=1341196&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/sockaddr.c (original)
+++ apr/apr/trunk/network_io/unix/sockaddr.c Mon May 21 20:38:41 2012
@@ -365,8 +365,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