]> git.meshlink.io Git - meshlink/commitdiff
Call node_status_cb() whenever a node goes up or down.
authorGuus Sliepen <guus@meshlink.io>
Mon, 12 May 2014 17:53:54 +0000 (19:53 +0200)
committerGuus Sliepen <guus@meshlink.io>
Mon, 12 May 2014 17:53:54 +0000 (19:53 +0200)
src/graph.c

index 3cf458937074c5945251e85f7b34e1d895e576eb..34af237e0b228ed8547b6ee6de460bd854614cee 100644 (file)
@@ -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);