/*
This file is part of GNUnet.
- Copyright (C) 2007-2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2007-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
* peer and ask for it.
*
* @param cls for which peer to schedule the HELLO
- * @param tc task context
*/
static void
-schedule_next_hello (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+schedule_next_hello (void *cls)
{
struct Peer *pl = cls;
struct FindAdvHelloContext fah;
pl->hello_delay_task = NULL;
GNUNET_assert (GNUNET_YES == pl->is_connected);
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return; /* we're out of here */
if (pl->hello_req != NULL)
return; /* did not finish sending the previous one */
/* find applicable HELLOs */
GNUNET_SCHEDULER_add_delayed (fah.next_adv,
&schedule_next_hello,
pl);
- if (fah.result == NULL)
+ if (NULL == fah.result)
return;
next_want = GNUNET_HELLO_size (fah.result->hello);
delay = GNUNET_TIME_absolute_get_remaining (pl->next_hello_allowed);
* Add peers and schedule connection attempt
*
* @param cls unused, NULL
- * @param tc scheduler context
*/
static void
-add_peer_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+add_peer_task (void *cls)
{
add_task = NULL;
* the transport and core.
*
* @param cls unused, NULL
- * @param tc scheduler context
*/
static void
-cleaning_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleaning_task (void *cls)
{
if (NULL != peerinfo_notify)
{
NULL, GNUNET_NO,
NULL, GNUNET_NO,
handlers);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &cleaning_task,
- NULL);
+ GNUNET_SCHEDULER_add_shutdown (&cleaning_task,
+ NULL);
if (NULL == transport)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,