/*
This file is part of GNUnet.
- Copyright (C) 2011-2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2011-2015 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
*/
static struct GNUNET_PeerIdentity pid;
-/**
- * Task scheduled for cleanup / termination of the process.
- */
-static struct GNUNET_SCHEDULER_Task * end;
-
/**
* Selected level of verbosity.
*/
* Stops monitoring activity.
*
* @param cls NULL
- * @param tc scheduler context
*/
static void
-shutdown_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
{
struct Iteration *icur;
struct Iteration *inext;
if (it_count == benchmark_iterations)
{
benchmark_running = GNUNET_NO;
- if (NULL != end)
- GNUNET_SCHEDULER_cancel (end);
- end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
+ GNUNET_SCHEDULER_shutdown ();
return;
}
else
ats_sh = GNUNET_ATS_connectivity_suggest (ats,
&pid,
1);
- end = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &shutdown_task,
- NULL);
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+ NULL);
}