From: Bart Polot Date: Tue, 6 Mar 2012 15:57:24 +0000 (+0000) Subject: - Fix for #2183: own position in tree only checked on new nodes caused assertion... X-Git-Tag: initial-import-from-subversion-38251~14396 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=16dd62ee0d62d6b9b319a159f48d0e6ec7601c1c;p=oweals%2Fgnunet.git - Fix for #2183: own position in tree only checked on new nodes caused assertion error when own node was reinserted --- diff --git a/src/mesh/mesh_tunnel_tree.c b/src/mesh/mesh_tunnel_tree.c index 445b7100d..287eefc7b 100644 --- a/src/mesh/mesh_tunnel_tree.c +++ b/src/mesh/mesh_tunnel_tree.c @@ -837,7 +837,7 @@ tree_add_path (struct MeshTunnelTree *t, const struct MeshPeerPath *p, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: Adding peer %s.\n", GNUNET_i2s (&id)); GNUNET_PEER_resolve (parent->peer, &id); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: to %s.\n", + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree: to %s.\n", GNUNET_i2s (&id)); #endif @@ -860,11 +860,11 @@ tree_add_path (struct MeshTunnelTree *t, const struct MeshPeerPath *p, #endif n = tree_node_new (parent, p->peers[i]); n->status = MESH_PEER_RELAY; - if (n->peer == 1) - { - t->me = n; - me = i; - } + } + if (n->peer == 1) + { + t->me = n; + me = i; } i++; parent = n;