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

View File

@ -360,18 +360,27 @@ 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");
GNUNET_SCHEDULER_shutdown ();
wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&world,
NULL);
if (11 == c)
GNUNET_SCHEDULER_shutdown ();
}
@ -380,9 +389,9 @@ hello (void *arg)
{
printf ("Hello\n");
GNUNET_SCHEDULER_add_shutdown (&ending, NULL);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&world,
NULL);
wt = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&world,
NULL);
}