Fix for missing me node causing assert and segfault errors
authorBart Polot <bart@net.in.tum.de>
Sat, 12 Nov 2011 23:33:03 +0000 (23:33 +0000)
committerBart Polot <bart@net.in.tum.de>
Sat, 12 Nov 2011 23:33:03 +0000 (23:33 +0000)
src/mesh/mesh_tunnel_tree.c

index e39558c0b829b8b3fb08c8038650c49a9cad0771..b43fb2534b05ac5465ba07e9a384ab8ad7f9bae2 100644 (file)
@@ -900,6 +900,8 @@ tree_add_path (struct MeshTunnelTree *t, const struct MeshPeerPath *p,
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree:   New node added.\n");
 #endif
+  if (NULL == t->me)
+    t->me = tree_find_peer (t, 1);
   return GNUNET_OK;
 }