Nodes should only be in the node_udp_tree if they are reachable.

This commit is contained in:
Guus Sliepen 2005-01-04 22:19:56 +00:00
parent fe0bfa3e65
commit 39fe3b445c
2 changed files with 2 additions and 2 deletions

View file

@ -258,9 +258,11 @@ void sssp_bfs(void)
if(n->status.reachable) { if(n->status.reachable) {
ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became reachable"), ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became reachable"),
n->name, n->hostname); n->name, n->hostname);
avl_insert(node_udp_tree, n);
} else { } else {
ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became unreachable"), ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became unreachable"),
n->name, n->hostname); n->name, n->hostname);
avl_delete(node_udp_tree, n);
} }
n->status.validkey = false; n->status.validkey = false;

View file

@ -123,7 +123,6 @@ void node_add(node_t *n)
cp(); cp();
avl_insert(node_tree, n); avl_insert(node_tree, n);
avl_insert(node_udp_tree, n);
} }
void node_del(node_t *n) void node_del(node_t *n)
@ -147,7 +146,6 @@ void node_del(node_t *n)
} }
avl_delete(node_tree, n); avl_delete(node_tree, n);
avl_delete(node_udp_tree, n);
} }
node_t *lookup_node(char *name) node_t *lookup_node(char *name)