From bd64dba29c465b016ac1d2fb53f2bf09f8feaddd Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 12 May 2014 19:53:54 +0200 Subject: [PATCH] Call node_status_cb() whenever a node goes up or down. --- src/graph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.2