/*
This file is part of GNUnet
- Copyright (C) 2002-2014 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2002-2014 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
/**
* Session timeout task
*/
- struct GNUNET_SCHEDULER_Task * put_disconnect_task;
+ struct GNUNET_SCHEDULER_Task *put_disconnect_task;
/**
* Session timeout task
*/
- struct GNUNET_SCHEDULER_Task * timeout_task;
+ struct GNUNET_SCHEDULER_Task *timeout_task;
/**
* Task to wake up client receive handle when receiving is allowed again
*/
- struct GNUNET_SCHEDULER_Task * recv_wakeup_task;
+ struct GNUNET_SCHEDULER_Task *recv_wakeup_task;
/**
* Absolute time when to receive data again.
* @param tc gnunet scheduler task context
*/
static void
-client_run (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+client_run (void *cls);
/**
* is the delayed task that actually disconnects the PUT.
*
* @param cls the `struct GNUNET_ATS_Session *` with the put
- * @param tc scheduler context
*/
static void
-client_put_disconnect (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+client_put_disconnect (void *cls)
{
struct GNUNET_ATS_Session *s = cls;
* Wake up a curl handle which was suspended
*
* @param cls the session
- * @param tc task context
*/
static void
-client_wake_up (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+client_wake_up (void *cls)
{
struct GNUNET_ATS_Session *s = cls;
s->recv_wakeup_task = NULL;
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Session %p/request %p: Waking up GET handle\n",
s, s->get.easyhandle);
* Task performing curl operations
*
* @param cls plugin as closure
- * @param tc scheduler task context
*/
static void
-client_run (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+client_run (void *cls)
{
struct HTTP_Client_Plugin *plugin = cls;
int running;
int msgs_left;
plugin->client_perform_task = NULL;
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
-
/* While data are available or timeouts occured */
do
{
* Session was idle, so disconnect it
*
* @param cls the `struct GNUNET_ATS_Session` of the idle session
- * @param tc scheduler context
*/
static void
-client_session_timeout (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+client_session_timeout (void *cls)
{
struct GNUNET_ATS_Session *s = cls;
struct GNUNET_TIME_Relative left;
if (s->recv_wakeup_task != NULL)
{
GNUNET_SCHEDULER_cancel (s->recv_wakeup_task);
- s->recv_wakeup_task = GNUNET_SCHEDULER_add_delayed (delay,
- &client_wake_up, s);
+ s->recv_wakeup_task
+ = GNUNET_SCHEDULER_add_delayed (delay,
+ &client_wake_up,
+ s);
}
}