/*
This file is part of GNUnet.
- (C) 2012, 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2012, 2013 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.
*/
/**
* a few seconds to give the application a chance to give
* us another query).
*/
- GNUNET_SCHEDULER_TaskIdentifier timeout_task;
+ struct GNUNET_SCHEDULER_Task * timeout_task;
/**
* Task to reset cadets that had errors (asynchronously,
* as we may not be able to do it immediately during a
* callback from the cadet API).
*/
- GNUNET_SCHEDULER_TaskIdentifier reset_task;
+ struct GNUNET_SCHEDULER_Task * reset_task;
};
* Task called when it is time to destroy an inactive cadet channel.
*
* @param cls the `struct CadetHandle` to tear down
- * @param tc scheduler context, unused
*/
static void
-cadet_timeout (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+cadet_timeout (void *cls)
{
struct CadetHandle *mh = cls;
struct GNUNET_CADET_Channel *tun;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Timeout on cadet channel to %s\n",
GNUNET_i2s (&mh->target));
- mh->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+ mh->timeout_task = NULL;
tun = mh->channel;
mh->channel = NULL;
if(NULL != tun)
* Task called when it is time to reset an cadet.
*
* @param cls the `struct CadetHandle` to tear down
- * @param tc scheduler context, unused
*/
static void
-reset_cadet_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+reset_cadet_task (void *cls)
{
struct CadetHandle *mh = cls;
- mh->reset_task = GNUNET_SCHEDULER_NO_TASK;
+ mh->reset_task = NULL;
reset_cadet (mh);
}
static void
reset_cadet_async (struct CadetHandle *mh)
{
- if (GNUNET_SCHEDULER_NO_TASK != mh->reset_task)
+ if (NULL != mh->reset_task)
GNUNET_SCHEDULER_cancel (mh->reset_task);
mh->reset_task = GNUNET_SCHEDULER_add_now (&reset_cadet_task,
mh);
target);
if (NULL != mh)
{
- if (GNUNET_SCHEDULER_NO_TASK != mh->timeout_task)
+ if (NULL != mh->timeout_task)
{
GNUNET_SCHEDULER_cancel (mh->timeout_task);
- mh->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+ mh->timeout_task = NULL;
}
return mh;
}
mh);
if (NULL != mh->wh)
GNUNET_CADET_notify_transmit_ready_cancel (mh->wh);
- if (GNUNET_SCHEDULER_NO_TASK != mh->timeout_task)
+ if (NULL != mh->timeout_task)
GNUNET_SCHEDULER_cancel (mh->timeout_task);
- if (GNUNET_SCHEDULER_NO_TASK != mh->reset_task)
+ if (NULL != mh->reset_task)
GNUNET_SCHEDULER_cancel (mh->reset_task);
GNUNET_assert (0 ==
GNUNET_CONTAINER_multihashmap_size (mh->waiting_map));