From 3b372e41d55c13e96f0a457124d45857217efd6b Mon Sep 17 00:00:00 2001 From: Niklas Hofmann Date: Sat, 9 Aug 2014 12:02:55 +0200 Subject: [PATCH] dclass transfer while adding edges improved --- src/protocol_edge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 1baa0387..5ab15863 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -87,17 +87,19 @@ bool add_edge_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { if(!from) { from = new_node(); from->name = xstrdup(from_name); - from->dclass = from_dclass; node_add(mesh, from); } + from->dclass = from_dclass; + if(!to) { to = new_node(); to->name = xstrdup(to_name); - to->dclass = to_dclass; node_add(mesh, to); } + to->dclass = to_dclass; + /* Convert addresses */ address = str2sockaddr(to_address, to_port); -- 2.39.5