static void mst_kruskal(void) {
/* Clear MST status on connections */
- for list_each(connection_t, c, connection_list)
+ for list_each(connection_t, c, mesh->connections)
c->status.mst = false;
logger(DEBUG_SCARY_THINGS, LOG_DEBUG, "Running Kruskal's algorithm:");
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;
+ n->last_state_change = mesh->loop.now.tv_sec;
if(n->status.reachable) {
logger(DEBUG_TRAFFIC, LOG_DEBUG, "Node %s (%s) became reachable",
n->minmtu = 0;
n->mtuprobes = 0;
- timeout_del(&n->mtutimeout);
+ timeout_del(&mesh->loop, &n->mtutimeout);
//TODO: callback to application to inform of this node going up/down