summaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-10-24 14:29:53 +0000
committerBart Polot <bart@net.in.tum.de>2011-10-24 14:29:53 +0000
commitf387e75c669b0963e7865fdda5958791bac34363 (patch)
treeaf9bb216ac90fb4f1cd90d527356b3e5b67650e7 /src/mesh
parentfbc27c5aaa6a05ddc547b1a5607519644019cc2d (diff)
Changed testcase to not die on unknown peer, log warning instead
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/test_mesh_small.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c
index 0888c1e00..e77ddcf15 100644
--- a/src/mesh/test_mesh_small.c
+++ b/src/mesh/test_mesh_small.c
@@ -477,11 +477,11 @@ static void
do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "***************** test: test_task\n");
- GNUNET_MESH_peer_request_connect_add(t, &d2->id);
if (test == MULTICAST)
{
GNUNET_MESH_peer_request_connect_add(t, &d3->id);
}
+ GNUNET_MESH_peer_request_connect_add(t, &d2->id);
if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
{
GNUNET_SCHEDULER_cancel (disconnect_task);
@@ -519,7 +519,14 @@ topo_cb (void *cls,
{
p2 = GNUNET_PEER_search(second);
GNUNET_assert(p2 < num_peers);
- GNUNET_assert(p2 > 0);
+ if (p2 == 0)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "***************** test: %s is UNKNOWN!?\n",
+ GNUNET_i2s(second));
+ GNUNET_break (0);
+ return;
+ }
mesh_peers[p2]++;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"***************** test: %s IS a neighbor\n",