aboutsummaryrefslogtreecommitdiff
path: root/src/rps/test_rps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/test_rps.c')
-rw-r--r--src/rps/test_rps.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c
index aca58d55e..128a81f21 100644
--- a/src/rps/test_rps.c
+++ b/src/rps/test_rps.c
@@ -38,7 +38,7 @@
38/** 38/**
39 * How many peers do we start? 39 * How many peers do we start?
40 */ 40 */
41uint32_t num_peers; 41static uint32_t num_peers;
42 42
43/** 43/**
44 * How long do we run the test? 44 * How long do we run the test?
@@ -256,19 +256,12 @@ static unsigned int num_peers_online;
256 */ 256 */
257static int ok; 257static int ok;
258 258
259
260/** 259/**
261 * Identifier for the churn task that runs periodically 260 * Identifier for the churn task that runs periodically
262 */ 261 */
263static struct GNUNET_SCHEDULER_Task *churn_task; 262static struct GNUNET_SCHEDULER_Task *churn_task;
264 263
265/** 264/**
266 * Identifier for the churn task that runs periodically
267 */
268static struct GNUNET_SCHEDULER_Task *shutdown_task;
269
270
271/**
272 * Called to initialise the given RPSPeer 265 * Called to initialise the given RPSPeer
273 */ 266 */
274typedef void (*InitPeer) (struct RPSPeer *rps_peer); 267typedef void (*InitPeer) (struct RPSPeer *rps_peer);
@@ -362,7 +355,7 @@ static int in_shutdown;
362 * Append arguments to file 355 * Append arguments to file
363 */ 356 */
364static void 357static void
365tofile_ (const char *file_name, char *line) 358tofile_ (const char *file_name, const char *line)
366{ 359{
367 struct GNUNET_DISK_FileHandle *f; 360 struct GNUNET_DISK_FileHandle *f;
368 /* char output_buffer[512]; */ 361 /* char output_buffer[512]; */
@@ -754,8 +747,7 @@ default_reply_handle (void *cls,
754 747
755 if (0 == evaluate ()) 748 if (0 == evaluate ())
756 { 749 {
757 GNUNET_SCHEDULER_cancel (shutdown_task); 750 GNUNET_SCHEDULER_shutdown ();
758 shutdown_task = GNUNET_SCHEDULER_add_now (&shutdown_op, NULL);
759 } 751 }
760} 752}
761 753
@@ -1388,7 +1380,7 @@ run (void *cls,
1388 1380
1389 if (NULL != churn_task) 1381 if (NULL != churn_task)
1390 GNUNET_SCHEDULER_cancel (churn_task); 1382 GNUNET_SCHEDULER_cancel (churn_task);
1391 shutdown_task = GNUNET_SCHEDULER_add_delayed (timeout, &shutdown_op, NULL); 1383 GNUNET_SCHEDULER_add_delayed (timeout, &shutdown_op, NULL);
1392} 1384}
1393 1385
1394 1386