]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/test_case_channel_conn_06/node_sim_peer.c
Correctly set device class after joining if the server didn't specify one.
[meshlink] / test / blackbox / test_case_channel_conn_06 / node_sim_peer.c
index a0be623779f2804cae7988b720c1df1430b4671e..c1a5b91abe4be6ae85031b305b7cbc2db89c0be4 100644 (file)
 #define CHANNEL_PORT 1234
 
 static int client_id = -1;
-static bool channel_rec;
-static bool channel_reply;
-static pthread_mutex_t reply_lock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t reply_cond = PTHREAD_COND_INITIALIZER;
-static pthread_mutex_t recv_lock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t recv_cond = PTHREAD_COND_INITIALIZER;
 
 static void channel_receive_cb(meshlink_handle_t *mesh, meshlink_channel_t *channel, const void *dat, size_t len);
 
@@ -61,7 +55,6 @@ static bool channel_accept(meshlink_handle_t *mesh, meshlink_channel_t *channel,
 }
 
 static void channel_receive_cb(meshlink_handle_t *mesh, meshlink_channel_t *channel, const void *dat, size_t len) {
-       fprintf(stderr, "\n\n\n LEN = %u & DATA = %s in RECV CB\n\n\n\n", len, (char *)dat);
 
        if(len == 0) {
                assert(mesh_event_sock_send(client_id, ERR_NETWORK, NULL, 0));
@@ -78,8 +71,9 @@ static void channel_receive_cb(meshlink_handle_t *mesh, meshlink_channel_t *chan
 }
 
 int main(int argc, char *argv[]) {
+       (void)argc;
+
        struct timeval main_loop_wait = { 5, 0 };
-       struct timespec timeout = {0};
 
        // Import mesh event handler