From 96965b151a80a5d33a1cd089a0a0430427694ba8 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Sun, 1 Jun 2014 18:42:26 +0200 Subject: [PATCH] Fix callback function --- src/event.h | 1 + src/meshlink.c | 3 ++- src/meshlink.h | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/event.h b/src/event.h index e49732af..c90e5067 100644 --- a/src/event.h +++ b/src/event.h @@ -21,6 +21,7 @@ #define __MESHLINK_EVENT_H__ #include "splay_tree.h" +#include "system.h" #define IO_READ 1 #define IO_WRITE 2 diff --git a/src/meshlink.c b/src/meshlink.c index 37901179..36a8b663 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -860,9 +860,10 @@ bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const //notify event loop signal_trigger(&(mesh->loop),&(mesh->datafromapp)); + return true; } -bool meshlink_send_from_queue(meshlink_handle_t *mesh) { +bool meshlink_send_from_queue(event_loop_t* el,meshlink_handle_t *mesh) { vpn_packet_t packet; meshlink_packethdr_t *hdr = (meshlink_packethdr_t *)packet.data; diff --git a/src/meshlink.h b/src/meshlink.h index 076c7ac7..cb588925 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -22,6 +22,7 @@ #include #include +#include "event.h" #ifdef __cplusplus extern "C" { @@ -196,7 +197,7 @@ extern void meshlink_set_log_cb(meshlink_handle_t *mesh, meshlink_log_level_t le */ extern bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const void *data, unsigned int len); -extern bool meshlink_send_from_queue (meshlink_handle_t *mesh); +extern bool meshlink_send_from_queue(event_loop_t* el,meshlink_handle_t *mesh); /// Get a handle for a specific node. /** This function returns a handle for the node with the given name. -- 2.39.5