From: Saverio Proto Date: Sun, 13 Apr 2014 21:59:19 +0000 (+0200) Subject: Data is correctly passed from the library to the application the callback X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=39238ae1f27e37cd2708596c49d90d733c930695;p=meshlink Data is correctly passed from the library to the application the callback --- diff --git a/meshlink-sample/meshlinkapp.c b/meshlink-sample/meshlinkapp.c index 25949b16..aa9b30c5 100644 --- a/meshlink-sample/meshlinkapp.c +++ b/meshlink-sample/meshlinkapp.c @@ -3,7 +3,7 @@ void handle_recv_data(void *data); void handle_recv_data(void *data) { -printf("do nothing for now\n"); +printf("Data received is %s\n",data); } diff --git a/src/route.c b/src/route.c index 539796df..e4007b47 100644 --- a/src/route.c +++ b/src/route.c @@ -74,7 +74,7 @@ void route(node_t *source,vpn_packet_t *packet) { if (owner == myself ) { //TODO: implement sending received data from meshlink library to the application logger(DEBUG_TRAFFIC, LOG_WARNING, "I received a packet for me with payload: %s \n", packet->data + 46); - (recv_callback)(NULL); + (recv_callback)(packet->data + 46); return; }