From ab3c7dded029e11418d581fe507c9712dd3b3c38 Mon Sep 17 00:00:00 2001 From: thorkill Date: Fri, 10 Jul 2015 00:48:41 +0200 Subject: [PATCH] Yet another attempt to make edge update work as expected --- src/protocol_edge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 901104c9..b5e92202 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -147,6 +147,8 @@ bool add_edge_h(connection_t *c, const char *request) { if(e->weight != weight){ logger(DEBUG_PROTOCOL, LOG_WARNING, "Got %s from %s (%s) with new weight %s -> %s %d -> %d", "ADD_EDGE", c->name, c->hostname, e->from->name, e->to->name, e->weight, weight); + edge_update_weigth(e, weight); + goto exit_with_graph; } else { logger(DEBUG_PROTOCOL, LOG_WARNING, "Got %s from %s (%s) which does not match existing entry", "ADD_EDGE", c->name, c->hostname); @@ -214,7 +216,7 @@ bool add_edge_h(connection_t *c, const char *request) { edge_add(e); /* Tell the rest about the new edge */ - + exit_with_graph: if(!tunnelserver) forward_request(c, request);