You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2011/03/21 21:23:20 UTC

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

Author: trawick
Date: Mon Mar 21 20:23:17 2011
New Revision: 1083933

URL: http://svn.apache.org/viewvc?rev=1083933&view=rev
Log:
Merge r1083931 from trunk:

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/branches/1.5.x/network_io/unix/sockaddr.c

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=1083933&r1=1083932&r2=1083933&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 Mar 21 20:23:17 2011
@@ -363,12 +363,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 
@@ -380,6 +381,7 @@ static apr_status_t call_resolver(apr_so
 #endif
             return error + APR_OS_START_EAIERR;
         }
+#endif /* WIN32 */
     }
 
     prev_sa = NULL;