Changed the name of edge from node to oldnode

This commit is contained in:
thorkill 2015-07-06 00:42:59 +02:00
parent 7dc8c736bc
commit e51dd1b196

View file

@ -336,8 +336,8 @@ void update_edge_weight(void) {
continue;
if (c->edge->avg_rtt && (c->edge->weight != c->edge->avg_rtt*10)) {
splay_node_t *node = splay_unlink(edge_weight_tree, c->edge);
if (!node)
splay_node_t *oldnode = splay_unlink(edge_weight_tree, c->edge);
if (!oldnode)
continue;
logger(DEBUG_STATUS, LOG_INFO, "update_edge_weight(): %s -> %s (%d -> %d)", c->edge->from->name,
@ -347,8 +347,8 @@ void update_edge_weight(void) {
/* avg_rtt is in ms */
c->edge->weight = c->edge->avg_rtt*10;
node->data = c->edge;
splay_insert_node(edge_weight_tree, node);
oldnode->data = c->edge;
splay_insert_node(edge_weight_tree, oldnode);
send_add_edge(c, c->edge);
}
}