assert(nb);
struct sync_flag channel_opened = {.flag = false};
- pthread_mutex_lock(&channel_opened.mutex);
meshlink_channel_t *channel = meshlink_channel_open(a, nb, 7, a_receive_cb, NULL, 0);
assert(channel);
a->priv = &pair_status;
meshlink_set_node_status_cb(a, pair_status_cb);
- pthread_mutex_lock(&pair_status.mutex);
-
meshlink_start(a);
meshlink_start(b);
assert(wait_sync_flag(&pair_status, 5));
- pthread_mutex_unlock(&pair_status.mutex);
-
meshlink_set_node_status_cb(a, NULL);
a->priv = NULL;
}