]> git.meshlink.io Git - meshlink/blobdiff - test/utils.c
Add meshlink_add_invitation_address(), deprecate meshlink_add_address().
[meshlink] / test / utils.c
index f7dd3b3caff93aa037bbb3d5eaae53e43c1b1061..d4ba6b6d8cbe530c8d2ff519dc373c765b1d210e 100644 (file)
@@ -1,5 +1,9 @@
 #define _GNU_SOURCE 1
 
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <pthread.h>
@@ -45,8 +49,8 @@ bool wait_sync_flag(struct sync_flag *s, int seconds) {
 void link_meshlink_pair(meshlink_handle_t *a, meshlink_handle_t *b) {
        // Import and export both side's data
 
-       meshlink_add_address(a, "localhost");
-       meshlink_add_address(b, "localhost");
+       assert(meshlink_set_canonical_address(a, meshlink_get_self(a), "localhost", NULL));
+       assert(meshlink_set_canonical_address(b, meshlink_get_self(b), "localhost", NULL));
 
        char *data = meshlink_export(a);
        assert(data);