From 22f08a69dbedf1e3ba292cb11de73e8ff891d063 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 20 Dec 2012 15:01:02 +0000 Subject: - add new test type, fix disconnect --- src/mesh/test_mesh_small.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 0e3df5ca8..12b49082f 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c @@ -54,6 +54,7 @@ #define SPEED_ACK 4 #define SPEED_MIN 5 #define SPEED_NOBUF 6 +#define P2P_SIGNAL 10 /** * Which test are we running? @@ -759,10 +760,10 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (GNUNET_SCHEDULER_NO_TASK != disconnect_task) { GNUNET_SCHEDULER_cancel (disconnect_task); - disconnect_task = - GNUNET_SCHEDULER_add_delayed (TIMEOUT, &disconnect_mesh_peers, - (void *) __LINE__); } + disconnect_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, + &disconnect_mesh_peers, + (void *) __LINE__); } /** @@ -884,6 +885,13 @@ main (int argc, char *argv[]) test_name = "multicast"; ok_goal = 10; } + else if (strstr (argv[0], "test_mesh_small_signal") != NULL) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SIGNAL\n"); + test = P2P_SIGNAL; + test_name = "signal"; + ok_goal = 5; + } else if (strstr (argv[0], "test_mesh_small_speed_ack") != NULL) { /* Each peer is supposed to generate the following callbacks: -- cgit v1.2.3