From: Guus Sliepen Date: Mon, 12 May 2014 17:53:54 +0000 (+0200) Subject: Call node_status_cb() whenever a node goes up or down. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=bd64dba29c465b016ac1d2fb53f2bf09f8feaddd Call node_status_cb() whenever a node goes up or down. --- diff --git a/src/graph.c b/src/graph.c index 3cf45893..34af237e 100644 --- a/src/graph.c +++ b/src/graph.c @@ -223,7 +223,8 @@ static void check_reachability(meshlink_handle_t *mesh) { timeout_del(&mesh->loop, &n->mtutimeout); - //TODO: callback to application to inform of this node going up/down + if(mesh->node_status_cb) + mesh->node_status_cb(mesh, (meshlink_node_t *)n, n->status.reachable); if(!n->status.reachable) { update_node_udp(mesh, n, NULL);