You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/09/19 15:57:24 UTC

svn commit: r697098 - /tomcat/connectors/trunk/jni/native/src/address.c

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