]> git.meshlink.io Git - meshlink/commitdiff
Fix waiting for two nodes to become reachable in the test suite.
authorGuus Sliepen <guus@meshlink.io>
Thu, 10 Oct 2019 20:16:20 +0000 (22:16 +0200)
committerGuus Sliepen <guus@meshlink.io>
Thu, 10 Oct 2019 20:16:20 +0000 (22:16 +0200)
test/utils.c

index d66ecdf979b65f911caf701f7916fc3e2ba743b8..f7dd3b3caff93aa037bbb3d5eaae53e43c1b1061 100644 (file)
@@ -97,7 +97,9 @@ void open_meshlink_pair(meshlink_handle_t **pa, meshlink_handle_t **pb, const ch
 static void pair_status_cb(meshlink_handle_t *mesh, meshlink_node_t *node, bool reachable) {
        (void)node;
 
-       set_sync_flag(mesh->priv, reachable);
+       if(reachable) {
+               set_sync_flag(mesh->priv, true);
+       }
 }
 
 void start_meshlink_pair(meshlink_handle_t *a, meshlink_handle_t *b) {