* Called to clean up, after a shutdown has been requested.
*
* @param cls closure
- * @param tc context information (why was this task triggered now)
*/
static void
-shutdown_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
{
while (NULL != sessions_head)
destroy_session (sessions_head);
}
statistics = GNUNET_STATISTICS_create ("consensus", cfg);
GNUNET_SERVER_add_handlers (server, server_handlers);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, NULL);
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL);
GNUNET_SERVER_disconnect_notify (server, handle_client_disconnect, NULL);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "consensus running\n");
}