diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2014-01-08 21:29:00 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2014-01-08 21:29:00 +0000 |
commit | 7ab6edba583d8d09d2c830c9c5b6fe155d31b408 (patch) | |
tree | d17756d007570647e62e15e1bf5f1e112ceca37d /src/testbed/test_testbed_underlay.c | |
parent | e7c031de1d196d5450213fad53419f76c0299109 (diff) | |
download | gnunet-7ab6edba583d8d09d2c830c9c5b6fe155d31b408.tar.gz gnunet-7ab6edba583d8d09d2c830c9c5b6fe155d31b408.zip |
-fixes
Diffstat (limited to 'src/testbed/test_testbed_underlay.c')
-rw-r--r-- | src/testbed/test_testbed_underlay.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testbed/test_testbed_underlay.c b/src/testbed/test_testbed_underlay.c index 6b66a5f7a..fe70036f7 100644 --- a/src/testbed/test_testbed_underlay.c +++ b/src/testbed/test_testbed_underlay.c | |||
@@ -43,6 +43,21 @@ static struct GNUNET_TESTBED_Operation *op; | |||
43 | 43 | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Shutdown testcase | ||
47 | * | ||
48 | * @param cls NULL | ||
49 | * @param tc scheduler task context | ||
50 | */ | ||
51 | static void | ||
52 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
53 | { | ||
54 | if (NULL != op) | ||
55 | GNUNET_TESTBED_operation_done (op); | ||
56 | op = NULL; | ||
57 | } | ||
58 | |||
59 | |||
60 | /** | ||
46 | * Callback to be called when an operation is completed | 61 | * Callback to be called when an operation is completed |
47 | * | 62 | * |
48 | * @param cls the callback closure from functions generating an operation | 63 | * @param cls the callback closure from functions generating an operation |
@@ -90,6 +105,7 @@ test_master (void *cls, | |||
90 | if (NULL == peers_) | 105 | if (NULL == peers_) |
91 | { | 106 | { |
92 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failing test due to timeout\n"); | 107 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failing test due to timeout\n"); |
108 | GNUNET_SCHEDULER_shutdown (); | ||
93 | return; | 109 | return; |
94 | } | 110 | } |
95 | GNUNET_assert (NUM_PEERS == num_peers); | 111 | GNUNET_assert (NUM_PEERS == num_peers); |
@@ -99,6 +115,9 @@ test_master (void *cls, | |||
99 | NULL, | 115 | NULL, |
100 | peers_[0], | 116 | peers_[0], |
101 | peers_[2]); | 117 | peers_[2]); |
118 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, | ||
119 | 15), | ||
120 | &do_shutdown, NULL); | ||
102 | } | 121 | } |
103 | 122 | ||
104 | 123 | ||