You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/06/03 23:29:25 UTC

svn commit: r951166 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/InetAddress.cpp

Author: tabish
Date: Thu Jun  3 21:29:25 2010
New Revision: 951166

URL: http://svn.apache.org/viewvc?rev=951166&view=rev
Log:
Make the address family check compiler even on platforms that don't have IPV6 support.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/InetAddress.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/InetAddress.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/InetAddress.cpp?rev=951166&r1=951165&r2=951166&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/InetAddress.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/InetAddress.cpp Thu Jun  3 21:29:25 2010
@@ -165,10 +165,10 @@ InetAddress InetAddress::getLocalHost() 
             __FILE__, __LINE__, "Could not resolve the IP Address of this host." );
     }
 
-    if( address->family == APR_INET6 ) {
-        return Inet6Address( hostname, (const unsigned char*)address->ipaddr_ptr, address->ipaddr_len );
-    } else {
+    if( address->family == APR_INET ) {
         return Inet4Address( hostname, (const unsigned char*)address->ipaddr_ptr, address->ipaddr_len );
+    } else {
+        return Inet6Address( hostname, (const unsigned char*)address->ipaddr_ptr, address->ipaddr_len );
     }
 }