This commit is contained in:
Christian Grothoff 2016-07-13 14:54:43 +02:00
parent 936a0a9ded
commit af96cb7e56

View File

@ -360,17 +360,26 @@ cleanup_auction_data ()
free (ad);
}
static struct GNUNET_SCHEDULER_Task *wt;
static void
ending (void *arg)
{
printf ("Good bye!!\n");
GNUNET_SCHEDULER_cancel (wt);
}
static void
world (void *arg)
{
static int c++;
printf ("World!\n");
wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&world,
NULL);
if (11 == c)
GNUNET_SCHEDULER_shutdown ();
}
@ -380,7 +389,7 @@ hello (void *arg)
{
printf ("Hello\n");
GNUNET_SCHEDULER_add_shutdown (&ending, NULL);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&world,
NULL);
}