apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r584651 - /apr/apr/branches/1.2.x/test/testipsub.c
Date Mon, 15 Oct 2007 01:10:53 GMT
Author: wrowe
Date: Sun Oct 14 18:10:52 2007
New Revision: 584651

URL: http://svn.apache.org/viewvc?rev=584651&view=rev
Log:
Prevent the suite from crashing on win32, watch out for an
empty sa result when using win32 with IPv6 extentions and
no IPv6 driver; it seems it leverages the driver to resolve
the third class of IPv6 addresses on Win XP SP2 at least.

Backport: 584650

Modified:
    apr/apr/branches/1.2.x/test/testipsub.c

Modified: apr/apr/branches/1.2.x/test/testipsub.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testipsub.c?rev=584651&r1=584650&r2=584651&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testipsub.c (original)
+++ apr/apr/branches/1.2.x/test/testipsub.c Sun Oct 14 18:10:52 2007
@@ -111,11 +111,13 @@
         char *in_subnet, *not_in_subnet;
     } testcases[] =
     {
-        {"9.67",              NULL,            APR_INET,  "9.67.113.15",         "10.1.2.3"}
+         {"9.67",             NULL,            APR_INET,  "9.67.113.15",         "10.1.2.3"}
         ,{"9.67.0.0",         "16",            APR_INET,  "9.67.113.15",         "10.1.2.3"}
         ,{"9.67.0.0",         "255.255.0.0",   APR_INET,  "9.67.113.15",         "10.1.2.3"}
         ,{"9.67.113.99",      "16",            APR_INET,  "9.67.113.15",         "10.1.2.3"}
         ,{"9.67.113.99",      "255.255.255.0", APR_INET,  "9.67.113.15",         "10.1.2.3"}
+        ,{"127",              NULL,            APR_INET,  "127.0.0.1",           "10.1.2.3"}
+        ,{"127.0.0.1",        "8",             APR_INET,  "127.0.0.1",           "10.1.2.3"}
 #if APR_HAVE_IPV6
         ,{"fe80::",           "8",             APR_INET6, "fe80::1",             "ff01::1"}
         ,{"ff01::",           "8",             APR_INET6, "ff01::1",             "fe80::1"}
@@ -134,6 +136,8 @@
         ABTS_TRUE(tc, rv == APR_SUCCESS);
         rv = apr_sockaddr_info_get(&sa, testcases[i].in_subnet, testcases[i].family,
0, 0, p);
         ABTS_TRUE(tc, rv == APR_SUCCESS);
+        ABTS_TRUE(tc, sa != NULL);
+        if (!sa) continue;
         rc = apr_ipsubnet_test(ipsub, sa);
         ABTS_TRUE(tc, rc != 0);
         rv = apr_sockaddr_info_get(&sa, testcases[i].not_in_subnet, testcases[i].family,
0, 0, p);



Mime
View raw message