tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r697098 - /tomcat/connectors/trunk/jni/native/src/address.c
Date Fri, 19 Sep 2008 13:57:24 GMT
Author: markt
Date: Fri Sep 19 06:57:24 2008
New Revision: 697098

URL: http://svn.apache.org/viewvc?rev=697098&view=rev
Log:
Improve my previous fix for handling case where there are no IPv6 addresses.

Modified:
    tomcat/connectors/trunk/jni/native/src/address.c

Modified: tomcat/connectors/trunk/jni/native/src/address.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/src/address.c?rev=697098&r1=697097&r2=697098&view=diff
==============================================================================
--- tomcat/connectors/trunk/jni/native/src/address.c (original)
+++ tomcat/connectors/trunk/jni/native/src/address.c Fri Sep 19 06:57:24 2008
@@ -48,11 +48,15 @@
 #if APR_HAVE_IPV6
     if (hostname == NULL) {
         /* Try all address using IPV6 one */
-        while (sl && sl->next) {
+        while (sl) {
             if (sl->family == APR_INET6)
                 break; /* Done */
             sl = sl->next;
         }
+        /* If we don't find an IPv6 address, use the original one */
+        if (sl == NULL) {
+            sl = sa;
+        }
     }
 #endif
 



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


Mime
View raw message