activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r951166 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/InetAddress.cpp
Date Thu, 03 Jun 2010 21:29:25 GMT
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
);
     }
 }
 



Mime
View raw message