aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-12-20 17:18:03 +0000
committerBart Polot <bart@net.in.tum.de>2012-12-20 17:18:03 +0000
commit098b1b239d70df090307f4aa3680bcd07e74eb0c (patch)
treea85577b9679407ba038f6fb6c1001a67866efaf6 /src/mesh
parent3946a7576d65824856894ca0903dc213a6ee5182 (diff)
downloadgnunet-098b1b239d70df090307f4aa3680bcd07e74eb0c.tar.gz
gnunet-098b1b239d70df090307f4aa3680bcd07e74eb0c.zip
- account for disconnection
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/mesh_tunnel_tree.h2
-rw-r--r--src/mesh/test_mesh_small.c10
-rw-r--r--src/mesh/test_mesh_small.conf2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/mesh/mesh_tunnel_tree.h b/src/mesh/mesh_tunnel_tree.h
index 94dcf13bf..e5d65921d 100644
--- a/src/mesh/mesh_tunnel_tree.h
+++ b/src/mesh/mesh_tunnel_tree.h
@@ -337,6 +337,8 @@ tree_notify_connection_broken (struct MeshTunnelTree *t, GNUNET_PEER_Id p1,
337 * If the tree is not local and no longer has any paths, the root node will be 337 * If the tree is not local and no longer has any paths, the root node will be
338 * destroyed and marked as NULL. 338 * destroyed and marked as NULL.
339 * 339 *
340 * FIXME: dont destroy the root
341 *
340 * @param t Tunnel tree to use. 342 * @param t Tunnel tree to use.
341 * @param peer Short ID of the peer to remove from the tunnel tree. 343 * @param peer Short ID of the peer to remove from the tunnel tree.
342 * @param cb Callback to notify client of disconnected peers. 344 * @param cb Callback to notify client of disconnected peers.
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c
index dbddf106b..ec7a2a0df 100644
--- a/src/mesh/test_mesh_small.c
+++ b/src/mesh/test_mesh_small.c
@@ -665,6 +665,16 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer)
665 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 665 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
666 "peer %s disconnected\n", 666 "peer %s disconnected\n",
667 GNUNET_i2s (peer)); 667 GNUNET_i2s (peer));
668 if (P2P_SIGNAL == test)
669 {
670 ok ++;
671 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
672 {
673 GNUNET_SCHEDULER_cancel (disconnect_task);
674 }
675 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
676 (void *) __LINE__);
677 }
668 return; 678 return;
669} 679}
670 680
diff --git a/src/mesh/test_mesh_small.conf b/src/mesh/test_mesh_small.conf
index 943ef3638..f9d50b4e6 100644
--- a/src/mesh/test_mesh_small.conf
+++ b/src/mesh/test_mesh_small.conf
@@ -11,7 +11,7 @@ ID_ANNOUNCE_TIME = 2 s
11CONNECT_TIMEOUT = 30 s 11CONNECT_TIMEOUT = 30 s
12DEFAULT_TTL = 64 12DEFAULT_TTL = 64
13DHT_REPLICAITON_LEVEL = 3 13DHT_REPLICAITON_LEVEL = 3
14# PREFIX = valgrind --leak-check=full --suppressions=valgrind-mesh.supp 14PREFIX = valgrind --leak-check=full --suppressions=valgrind-mesh.supp
15# PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args 15# PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args
16 16
17[testbed] 17[testbed]