summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2011-03-21 20:38:57 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2011-03-21 20:38:57 +0000
commit1df65900d83d9aefad60cc34f9853473a1eba628 (patch)
tree9ccb1cde232d344cdb534033b8eba8ad2c85344b
parent6171c7511610d8356313be2f3fc7b639be138be6 (diff)
downloadlibapr-1df65900d83d9aefad60cc34f9853473a1eba628.tar.gz
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 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1083949 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--network_io/unix/sockaddr.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index c0fd8fa10..001f6bdf1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes for APR 1.4.3
+ *) Fix error return values from apr_sockaddr_info_get() on Windows for
+ IPv6 builds. [Ivan Zhakov <ivan visualsvn.com>]
+
*) Add new experimental configure option --enable-allocator-uses-mmap to
use mmap instead of malloc in apr_allocator_alloc(). This greatly reduces
memory fragmentation with malloc implementations (e.g. glibc) that
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c
index 949ade73d..ed4c474dc 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -363,12 +363,13 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
}
#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_sockaddr_t **sa,
#endif
return error + APR_OS_START_EAIERR;
}
+#endif /* WIN32 */
}
prev_sa = NULL;