You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2007/04/03 12:45:56 UTC

svn commit: r525132 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Author: mturk
Date: Tue Apr  3 03:45:51 2007
New Revision: 525132

URL: http://svn.apache.org/viewvc?view=rev&rev=525132
Log:
Fix #41973 by not initializing IPV6 if address is null.
APR cannot listen both on IPV4 and IPV6 on some platforms
(e.g BSD and Windows).

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/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?view=diff&rev=525132&r1=525131&r2=525132
==============================================================================
--- 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 Apr  3 03:45:51 2007
@@ -587,6 +587,15 @@
             addressStr = address.getHostAddress();
         }
         int family = Socket.APR_INET;
+        if (Library.APR_HAVE_IPV6) {
+            if (addressStr == null) {
+                if (!OS.IS_BSD && !OS.IS_WIN32 && !OS.IS_WIN64)
+                    family = Socket.APR_UNSPEC;
+            } else if (addressStr.indexOf(':') >= 0) {
+                family = Socket.APR_UNSPEC;
+            }
+         }
+
         if (Library.APR_HAVE_IPV6 && (addressStr == null || addressStr.indexOf(':') >= 0)) {
             family = Socket.APR_UNSPEC;
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org