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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to