Correctly remove all duplicates when having many hostnames in an invitation URL.
authorGuus Sliepen <guus@meshlink.io>
Wed, 11 Mar 2020 22:12:08 +0000 (23:12 +0100)
committerGuus Sliepen <guus@meshlink.io>
Wed, 11 Mar 2020 22:12:08 +0000 (23:12 +0100)
Commit fbcf089 missed adjusting one call to
remove_duplicate_hostnames().

src/meshlink.c

index 789121d..f87e4de 100644 (file)
@@ -489,7 +489,7 @@ static char *get_my_hostname(meshlink_handle_t *mesh, uint32_t flags) {
                }
        }
 
-       remove_duplicate_hostnames(hostname, port, 4);
+       remove_duplicate_hostnames(hostname, port, n);
 
        // Resolve the hostnames
        for(int i = 0; i < n; i++) {