Author: mturk
Date: Tue May 16 00:09:43 2006
New Revision: 406857

URL: http://svn.apache.org/viewcvs?rev=406857&view=rev
Log:
Use APR_UNSPEC only if the provided address
actually is the IPV6 address.

Modified:
    
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=406857&r1=406856&r2=406857&view=diff
==============================================================================
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
Tue May 16 00:09:43 2006
@@ -553,8 +553,10 @@
             addressStr = address.getHostAddress();
         }
         int family = Socket.APR_INET;
-        if (Library.APR_HAVE_IPV6)
-            family= Socket.APR_UNSPEC;
+        if (Library.APR_HAVE_IPV6 && addressStr != null) {
+            if (addressStr.indexOf(':') >= 0)
+                family= Socket.APR_UNSPEC;
+        }
         long inetAddress = Address.info(addressStr, family,
                 port, 0, rootPool);
         // Create the APR server socket



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to