aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-13 14:54:43 +0200
committerChristian Grothoff <christian@grothoff.org>2016-07-13 14:54:43 +0200
commitaf96cb7e569043d8e06ff62e44c409b97ee646fc (patch)
tree1bd911ec46e80a159d58d423e7dd8ee071658a9b
parent936a0a9dedce46c76701fe3f0490866393b6e5fd (diff)
downloadlibbrandt-af96cb7e569043d8e06ff62e44c409b97ee646fc.tar.gz
libbrandt-af96cb7e569043d8e06ff62e44c409b97ee646fc.zip
schedu
-rw-r--r--test_crypto.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/test_crypto.c b/test_crypto.c
index 0aa4222..a96be12 100644
--- a/test_crypto.c
+++ b/test_crypto.c
@@ -360,18 +360,27 @@ cleanup_auction_data ()
360 free (ad); 360 free (ad);
361} 361}
362 362
363
364static struct GNUNET_SCHEDULER_Task *wt;
365
363static void 366static void
364ending (void *arg) 367ending (void *arg)
365{ 368{
366 printf ("Good bye!!\n"); 369 printf ("Good bye!!\n");
370 GNUNET_SCHEDULER_cancel (wt);
367} 371}
368 372
369 373
370static void 374static void
371world (void *arg) 375world (void *arg)
372{ 376{
377 static int c++;
373 printf ("World!\n"); 378 printf ("World!\n");
374 GNUNET_SCHEDULER_shutdown (); 379 wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
380 &world,
381 NULL);
382 if (11 == c)
383 GNUNET_SCHEDULER_shutdown ();
375} 384}
376 385
377 386
@@ -380,9 +389,9 @@ hello (void *arg)
380{ 389{
381 printf ("Hello\n"); 390 printf ("Hello\n");
382 GNUNET_SCHEDULER_add_shutdown (&ending, NULL); 391 GNUNET_SCHEDULER_add_shutdown (&ending, NULL);
383 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, 392 wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
384 &world, 393 &world,
385 NULL); 394 NULL);
386} 395}
387 396
388 397