X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fgraph.c;h=a7612ab0aa6d94c01230f7d7cc0ed2e36a29f61b;hb=528a8616e36ff08ddf1f9f16f748a272e48846be;hp=ce8fa6264ca2cafc61f5b06f286fa0a6899c0ce0;hpb=a7ef599e6bdd8730c5a949d4c1727c38d5b6ff9e;p=meshlink diff --git a/src/graph.c b/src/graph.c index ce8fa626..a7612ab0 100644 --- a/src/graph.c +++ b/src/graph.c @@ -71,7 +71,7 @@ static void mst_kruskal(void) { /* Clear visited status on nodes */ - for splay_each(node_t, n, node_tree) + for splay_each(node_t, n, mesh->nodes) n->status.visited = false; /* Starting point */ @@ -120,7 +120,7 @@ static void sssp_bfs(void) { /* Clear visited status on nodes */ - for splay_each(node_t, n, node_tree) { + for splay_each(node_t, n, mesh->nodes) { n->status.visited = false; n->status.indirect = true; n->distance = -1; @@ -196,7 +196,7 @@ static void sssp_bfs(void) { static void check_reachability(void) { /* Check reachability status. */ - for splay_each(node_t, n, node_tree) { + for splay_each(node_t, n, mesh->nodes) { if(n->status.visited != n->status.reachable) { n->status.reachable = !n->status.reachable; n->last_state_change = now.tv_sec;