+ assert(success);
+ int newport = meshlink_get_port(mesh1);
+ assert(oldport != newport);
+
+ assert(meshlink_start(mesh1));
+ quux_url = meshlink_invite(mesh1, NULL, "quux");
+ assert(quux_url);
+
+ // The old port should not be in the invitation URL
+
+ char portstr[10];
+ snprintf(portstr, sizeof(portstr), ":%d", oldport);
+ assert(!strstr(quux_url, portstr));
+
+ // The new port should be in the invitation URL
+
+ snprintf(portstr, sizeof(portstr), ":%d", newport);
+ assert(strstr(quux_url, portstr));
+
+ // The invitation should work
+
+ assert(meshlink_join(mesh3, quux_url));