]> git.meshlink.io Git - meshlink/blobdiff - src/graph.c
Call node_status_cb() whenever a node goes up or down.
[meshlink] / 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);