aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-12-20 15:01:02 +0000
committerBart Polot <bart@net.in.tum.de>2012-12-20 15:01:02 +0000
commit22f08a69dbedf1e3ba292cb11de73e8ff891d063 (patch)
tree222cdfbe30aeb2d7a6182d7d7c9e2864bfc40b04 /src/mesh
parentd6b20377017f334596ea030852fb006960e4b0fe (diff)
downloadgnunet-22f08a69dbedf1e3ba292cb11de73e8ff891d063.tar.gz
gnunet-22f08a69dbedf1e3ba292cb11de73e8ff891d063.zip
- add new test type, fix disconnect
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/test_mesh_small.c14
1 files 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 @@
54#define SPEED_ACK 4 54#define SPEED_ACK 4
55#define SPEED_MIN 5 55#define SPEED_MIN 5
56#define SPEED_NOBUF 6 56#define SPEED_NOBUF 6
57#define P2P_SIGNAL 10
57 58
58/** 59/**
59 * Which test are we running? 60 * Which test are we running?
@@ -759,10 +760,10 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
759 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task) 760 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
760 { 761 {
761 GNUNET_SCHEDULER_cancel (disconnect_task); 762 GNUNET_SCHEDULER_cancel (disconnect_task);
762 disconnect_task =
763 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &disconnect_mesh_peers,
764 (void *) __LINE__);
765 } 763 }
764 disconnect_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
765 &disconnect_mesh_peers,
766 (void *) __LINE__);
766} 767}
767 768
768/** 769/**
@@ -884,6 +885,13 @@ main (int argc, char *argv[])
884 test_name = "multicast"; 885 test_name = "multicast";
885 ok_goal = 10; 886 ok_goal = 10;
886 } 887 }
888 else if (strstr (argv[0], "test_mesh_small_signal") != NULL)
889 {
890 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SIGNAL\n");
891 test = P2P_SIGNAL;
892 test_name = "signal";
893 ok_goal = 5;
894 }
887 else if (strstr (argv[0], "test_mesh_small_speed_ack") != NULL) 895 else if (strstr (argv[0], "test_mesh_small_speed_ack") != NULL)
888 { 896 {
889 /* Each peer is supposed to generate the following callbacks: 897 /* Each peer is supposed to generate the following callbacks: