X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Ftrio.c;h=bdb3904e37e4540faf734e4bd5c7c145f3eddd35;hb=HEAD;hp=a183b3da92493d09e299989f843b160ec2bb93b9;hpb=fe5563f92021618b4a8b41e412c73d8364fcaf6e;p=meshlink diff --git a/test/trio.c b/test/trio.c index a183b3da..bdb3904e 100644 --- a/test/trio.c +++ b/test/trio.c @@ -47,7 +47,11 @@ static void baz_status_cb(meshlink_handle_t *mesh, meshlink_node_t *node, bool r } } -int main() { +int main(void) { + init_sync_flag(&received); + init_sync_flag(&bar_learned_baz); + init_sync_flag(&baz_learned_bar); + meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_cb); // Create three instances. @@ -65,7 +69,7 @@ int main() { assert(mesh[i]); free(path); - assert(meshlink_add_address(mesh[i], "localhost")); + assert(meshlink_set_canonical_address(mesh[i], meshlink_get_self(mesh[i]), "localhost", NULL)); data[i] = meshlink_export(mesh[i]); assert(data[i]);