3: torture: Use remove_duplicate_addrs2_sa() instead of remove_duplicate_addrs2(...
authorJeremy Allison <jra@samba.org>
Wed, 9 Sep 2020 16:25:07 +0000 (09:25 -0700)
committerNoel Power <npower@samba.org>
Tue, 15 Sep 2020 10:09:39 +0000 (10:09 +0000)
Spoiler, still passes :-).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
source3/torture/torture.c

index b4ad36127f534ac912eabf29d76076e9664b58d8..e356728e9c2c57ef1429a9f52279fd2d32483c96 100644 (file)
@@ -14019,7 +14019,7 @@ static const char *remove_duplicate_addrs2_test_strings_result[] = {
 
 static bool run_local_remove_duplicate_addrs2(int dummy)
 {
-       struct ip_service test_vector[28];
+       struct samba_sockaddr test_vector[28];
        size_t count, i;
 
        /* Construct the sockaddr_storage test vector. */
@@ -14040,13 +14040,13 @@ static bool run_local_remove_duplicate_addrs2(int dummy)
                        return false;
                }
                memset(&test_vector[i], '\0', sizeof(test_vector[i]));
-               memcpy(&test_vector[i].ss,
+               memcpy(&test_vector[i].u.ss,
                        res->ai_addr,
                        res->ai_addrlen);
                freeaddrinfo(res);
        }
 
-       count = remove_duplicate_addrs2(test_vector, i);
+       count = remove_duplicate_addrs2_sa(test_vector, i);
 
        if (count != 14) {
                fprintf(stderr, "count wrong (%zu) should be 14\n",
@@ -14057,7 +14057,7 @@ static bool run_local_remove_duplicate_addrs2(int dummy)
        for (i = 0; i < count; i++) {
                char addr[INET6_ADDRSTRLEN];
 
-               print_sockaddr(addr, sizeof(addr), &test_vector[i].ss);
+               print_sockaddr(addr, sizeof(addr), &test_vector[i].u.ss);
 
                if (strcmp(addr, remove_duplicate_addrs2_test_strings_result[i]) != 0) {
                        fprintf(stderr, "mismatch on [%zu] [%s] [%s]\n",