X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Ftrio.c;h=522020fe1d07bbe61d3811095d6fdf7278871ad1;hb=5a8c20cfd63b480e94101f7333e871511a92fd37;hp=2cb14bd301af273c37c9948a6efc58cd80be96c8;hpb=dc0e52cb3e42620c3139e713b373d130aa30b698;p=meshlink diff --git a/test/trio.c b/test/trio.c index 2cb14bd3..522020fe 100644 --- a/test/trio.c +++ b/test/trio.c @@ -53,12 +53,16 @@ int main() { for(int i = 0; i < 3; i++) { char *path; - asprintf(&path, "trio_conf.%d", i); + int ret_val; + (void)ret_val; + ret_val = asprintf(&path, "trio_conf.%d", i); assert(path); mesh[i] = meshlink_open(path, name[i], "trio", DEV_CLASS_BACKBONE); assert(mesh[i]); + meshlink_add_address(mesh[i], "localhost"); + data[i] = meshlink_export(mesh[i]); assert(data[i]); } @@ -81,7 +85,7 @@ int main() { // start the nodes for(int i = 0; i < 3; i++) { - meshlink_start(mesh[i]); + assert(meshlink_start(mesh[i])); } // the nodes should now learn about each other @@ -122,7 +126,7 @@ int main() { meshlink_set_log_cb(mesh[1], MESHLINK_DEBUG, log_cb); for(int i = 1; i < 3; i++) { - meshlink_start(mesh[i]); + assert(meshlink_start(mesh[i])); } assert(meshlink_get_node(mesh[1], name[2]));