From 39238ae1f27e37cd2708596c49d90d733c930695 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Sun, 13 Apr 2014 23:59:19 +0200 Subject: [PATCH] Data is correctly passed from the library to the application the callback --- meshlink-sample/meshlinkapp.c | 2 +- src/route.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5