e->address = address;
}
if(e->weight != weight) {
- avl_node_t *node = avl_unlink(edge_weight_tree, e);
+ splay_node_t *node = splay_unlink(edge_weight_tree, e);
e->weight = weight;
- avl_insert_node(edge_weight_tree, node);
+ splay_insert_node(edge_weight_tree, node);
}
- graph();
- return true;
+ goto done;
}
} else if(sockaddrcmp(&e->local_address, &local_address)) {
if(from == myself) {
e->weight = weight;
edge_add(e);
+done:
/* Tell the rest about the new edge */
if(!tunnelserver)