]> git.meshlink.io Git - meshlink/commitdiff
Data is correctly passed from the library to the application the callback
authorSaverio Proto <zioproto@gmail.com>
Sun, 13 Apr 2014 21:59:19 +0000 (23:59 +0200)
committerSaverio Proto <zioproto@gmail.com>
Sun, 13 Apr 2014 21:59:19 +0000 (23:59 +0200)
meshlink-sample/meshlinkapp.c
src/route.c

index 25949b161203d6519d793a99e591b23a7e289c52..aa9b30c5570d0351c16d40af5df7c9a77d8a4338 100644 (file)
@@ -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);
 
 }
 
index 539796dff9ac2cd89ae3c2aa90a23fd3959369ee..e4007b4715a9d99093863d4cf6b9b50cf6501222 100644 (file)
@@ -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;
     }