/*
This file is part of GNUnet
- (C) 2012 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2008--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.
*/
/**
/**
* Abort task identifier
*/
-static GNUNET_SCHEDULER_TaskIdentifier abort_task;
+static struct GNUNET_SCHEDULER_Task * abort_task;
/**
* Shutdown task identifier
*/
-static GNUNET_SCHEDULER_TaskIdentifier shutdown_task;
+static struct GNUNET_SCHEDULER_Task * shutdown_task;
/**
* Configuratin handler
* Shutdown nicely
*
* @param cls NULL
- * @param tc the task context
*/
static void
-do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_shutdown (void *cls)
{
- if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+ if (NULL != abort_task)
GNUNET_SCHEDULER_cancel (abort_task);
if (NULL != helper)
- GNUNET_HELPER_stop (helper);
+ GNUNET_HELPER_stop (helper, GNUNET_NO);
GNUNET_free_non_null (msg);
if (NULL != cfg)
GNUNET_CONFIGURATION_destroy (cfg);
* abort task to run on test timed out
*
* @param cls NULL
- * @param tc the task context
*/
static void
-do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_abort (void *cls)
{
- abort_task = GNUNET_SCHEDULER_NO_TASK;
+ abort_task = NULL;
LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n");
result = GNUNET_SYSERR;
if (NULL != shandle)
GNUNET_HELPER_send_cancel (shandle);
- if (GNUNET_SCHEDULER_NO_TASK == shutdown_task)
+ if (NULL == shutdown_task)
shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
}
* Continuation function.
*
* @param cls closure
- * @param result GNUNET_OK on success,
- * GNUNET_NO if helper process died
- * GNUNET_SYSERR during GNUNET_HELPER_stop
+ * @param result #GNUNET_OK on success,
+ * #GNUNET_NO if helper process died
+ * #GNUNET_SYSERR during GNUNET_HELPER_stop()
*/
static void
cont_cb (void *cls, int result)
* @param client identification of the client
* @param message the actual message
*
- * @return GNUNET_OK on success, GNUNET_SYSERR to stop further processing
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing
*/
static int
mst_cb (void *cls, void *client, const struct GNUNET_MessageHeader *message)
uncompress ((Bytef *) config, &config_size,
(const Bytef *) &msg[1], xconfig_size));
GNUNET_free (config);
- if (GNUNET_SCHEDULER_NO_TASK == shutdown_task)
+ if (NULL == shutdown_task)
shutdown_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 1),