diff options
author | Bernard Normier <bernard@zeroc.com> | 2008-05-15 16:12:23 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2008-05-15 16:12:23 -0400 |
commit | 1e062e206738f2cf5d58c7897598c6f98b4aa7f3 (patch) | |
tree | be4ce5cc972a0e4fb8654cd1f4259c7fc1587427 /cpp/src/Ice/Network.cpp | |
parent | Bug 3187 - add note about requiring java (diff) | |
download | ice-1e062e206738f2cf5d58c7897598c6f98b4aa7f3.tar.bz2 ice-1e062e206738f2cf5d58c7897598c6f98b4aa7f3.tar.xz ice-1e062e206738f2cf5d58c7897598c6f98b4aa7f3.zip |
Fixed bug #3187 - failure on MacOS X 10.4.x
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rw-r--r-- | cpp/src/Ice/Network.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 705f32d301d..3bbe962b268 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -1371,7 +1371,14 @@ IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol } while(info == 0 && rs == EAI_AGAIN && --retry >= 0); + // In theory, getaddrinfo should only return EAI_NONAME if AI_NUMERICHOST is specified and the host name + // is not a IP address. However on some platforms (e.g. Mac OS X 10.4.x) EAI_NODATA is also returned so + // we also check for it. +#ifdef EAI_NODATA + if(!blocking && (rs == EAI_NONAME || rs == EAI_NODATA)) +#else if(!blocking && rs == EAI_NONAME) +#endif { return result; // Empty result indicates that a blocking lookup is necessary. } |