apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1083931 - /apr/apr/trunk/network_io/unix/sockaddr.c
Date Mon, 21 Mar 2011 20:15:32 GMT
Author: trawick
Date: Mon Mar 21 20:15:32 2011
New Revision: 1083931

URL: http://svn.apache.org/viewvc?rev=1083931&view=rev
Log:
use apr_get_netos_error() to retrieve the getaddrinfo() error
code on Windows

before: 
  error: 681001/APR does not understand this error code

after:
  error: 731001/No such host is known.

(the latter matches an IPv4-only build)

Submitted by: Ivan Zhakov <ivan visualsvn.com>
Reviewed by: trawick

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=1083931&r1=1083930&r2=1083931&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/sockaddr.c (original)
+++ apr/apr/trunk/network_io/unix/sockaddr.c Mon Mar 21 20:15:32 2011
@@ -371,12 +371,13 @@ static apr_status_t call_resolver(apr_so
     }
 #endif
     if (error) {
-#ifndef WIN32
+#if defined(WIN32)
+        return apr_get_netos_error();
+#else
         if (error == EAI_SYSTEM) {
             return errno;
         }
         else 
-#endif
         {
             /* issues with representing this with APR's error scheme:
              * glibc uses negative values for these numbers, perhaps so 
@@ -388,6 +389,7 @@ static apr_status_t call_resolver(apr_so
 #endif
             return error + APR_OS_START_EAIERR;
         }
+#endif /* WIN32 */
     }
 
     prev_sa = NULL;



Mime
View raw message