return true;
}
-bool meshlink_send_from_queue(event_loop_t* el,meshlink_handle_t *mesh) {
+void 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;
outpacketqueue_t* p = list_get_tail(mesh->outpacketqueue);
if (p)
list_delete_tail(mesh->outpacketqueue);
- else return false;
+ else return ;
if (sizeof(meshlink_packethdr_t) + p->len > MAXSIZE) {
//log something
- return false;
+ return ;
}
packet.probe = false;
mesh->self->in_packets++;
mesh->self->in_bytes += packet.len;
route(mesh, mesh->self, &packet);
- return false;
+ return ;
}
meshlink_node_t *meshlink_get_node(meshlink_handle_t *mesh, const char *name) {
*/
extern bool meshlink_send(meshlink_handle_t *mesh, meshlink_node_t *destination, const void *data, unsigned int len);
-extern bool meshlink_send_from_queue(event_loop_t* el,meshlink_handle_t *mesh);
+extern void 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.
//Add signal handler
mesh->datafromapp.signum = 0;
- signal_add(&(mesh->loop),&(mesh->datafromapp), meshlink_send_from_queue,mesh, mesh->datafromapp.signum);
+ signal_add(&(mesh->loop),&(mesh->datafromapp), (signal_cb_t)meshlink_send_from_queue,mesh, mesh->datafromapp.signum);
if(!event_loop_run(&mesh->loop)) {
logger(DEBUG_ALWAYS, LOG_ERR, "Error while waiting for input: %s", strerror(errno));