/*
This file is part of GNUnet.
- (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009, 2010, 2011 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
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* We've waited long enough, reconnect now.
*
* @param cls the `struct GNUNET_STATISTICS_Handle` to reconnect
- * @param tc scheduler context (unused)
*/
static void
-reconnect_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+reconnect_task (void *cls)
{
struct GNUNET_STATISTICS_Handle *h = cls;
* Task used by 'reconnect_later' to shutdown the handle
*
* @param cls the statistics handle
- * @param tc scheduler context
*/
static void
-do_destroy (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_destroy (void *cls)
{
struct GNUNET_STATISTICS_Handle *h = cls;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Could not save some persistent statistics\n"));
h->do_destroy = GNUNET_NO;
- GNUNET_SCHEDULER_add_continuation (&do_destroy, h,
- GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+ GNUNET_SCHEDULER_add_now (&do_destroy, h);
return;
}
h->backoff_task =
* Task used to destroy the statistics handle.
*
* @param cls the `struct GNUNET_STATISTICS_Handle`
- * @param tc the scheduler context
*/
static void
-destroy_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+destroy_task (void *cls)
{
struct GNUNET_STATISTICS_Handle *h = cls;
return;
}
h->do_destroy = GNUNET_NO;
- GNUNET_SCHEDULER_add_continuation (&destroy_task, h,
- GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+ GNUNET_SCHEDULER_add_now (&destroy_task, h);
break;
case GNUNET_MESSAGE_TYPE_STATISTICS_END:
LOG (GNUNET_ERROR_TYPE_DEBUG,
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Failed to receive acknowledgement from statistics service, some statistics might have been lost!\n"));
h->do_destroy = GNUNET_NO;
- GNUNET_SCHEDULER_add_continuation (&destroy_task, h,
- GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+ GNUNET_SCHEDULER_add_now (&destroy_task, h);
return 0;
}
hdr.type = htons (GNUNET_MESSAGE_TYPE_TEST);
* call the continuation.
*
* @param cls the `struct GNUNET_STATISTICS_GetHandle`
- * @param tc scheduler context
*/
static void
-run_get_timeout (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+run_get_timeout (void *cls)
{
struct GNUNET_STATISTICS_GetHandle *gh = cls;
GNUNET_STATISTICS_Callback cont = gh->cont;
ai->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout,
&run_get_timeout,
ai);
- GNUNET_CONTAINER_DLL_insert_tail (handle->action_head, handle->action_tail,
+ GNUNET_CONTAINER_DLL_insert_tail (handle->action_head,
+ handle->action_tail,
ai);
schedule_action (handle);
return ai;