tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r406860 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Date Tue, 16 May 2006 07:14:46 GMT
Author: mturk
Date: Tue May 16 00:14:46 2006
New Revision: 406860

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

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=406860&r1=406859&r2=406860&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue May 16 00:14:46
2006
@@ -561,8 +561,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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message