/*
This file is part of GNUnet
- (C) 2008--2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2008--2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
/**
* Abort task identifier
*/
-static GNUNET_SCHEDULER_TaskIdentifier abort_task;
+static struct GNUNET_SCHEDULER_Task * abort_task;
/**
* Delayed connect job identifier
*/
-static GNUNET_SCHEDULER_TaskIdentifier delayed_connect_task;
+static struct GNUNET_SCHEDULER_Task * delayed_connect_task;
/**
* Different stages in testing
static void
do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+ if (NULL != abort_task)
GNUNET_SCHEDULER_cancel (abort_task);
if (NULL != hc_handle)
GNUNET_TESTBED_is_host_habitable_cancel (hc_handle);
- GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == delayed_connect_task);
+ GNUNET_assert (NULL == delayed_connect_task);
if (NULL != common_operation)
GNUNET_TESTBED_operation_done (common_operation);
if (NULL != reg_handle)
do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n");
- abort_task = GNUNET_SCHEDULER_NO_TASK;
- if (GNUNET_SCHEDULER_NO_TASK != delayed_connect_task)
+ abort_task = NULL;
+ if (NULL != delayed_connect_task)
{
GNUNET_SCHEDULER_cancel (delayed_connect_task);
- delayed_connect_task = GNUNET_SCHEDULER_NO_TASK;
+ delayed_connect_task = NULL;
}
do_shutdown (cls, tc);
}
static void
abort_test ()
{
- if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+ if (NULL != abort_task)
GNUNET_SCHEDULER_cancel (abort_task);
abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
}
static void
do_delayed_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- delayed_connect_task = GNUNET_SCHEDULER_NO_TASK;
+ delayed_connect_task = NULL;
if (NULL != common_operation)
{
GNUNET_break (0);
result = PEER1_STARTED;
common_operation =
GNUNET_TESTBED_controller_link (NULL, controller1, neighbour1, NULL,
- cfg, GNUNET_YES);
+ GNUNET_YES);
break;
case PEER2_CREATED:
if (event->details.peer_start.host != neighbour1)
}
common_operation =
GNUNET_TESTBED_controller_link (NULL, controller1, neighbour2, NULL,
- cfg, GNUNET_YES);
+ GNUNET_YES);
if (NULL == common_operation)
{
GNUNET_break (0);
"to use password less SSH logins to localhost.\n"
"Skipping test\n");
GNUNET_SCHEDULER_cancel (abort_task);
- abort_task = GNUNET_SCHEDULER_NO_TASK;
+ abort_task = NULL;
(void) GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
result = SKIP;
return;
}
cp1 =
- GNUNET_TESTBED_controller_start ("127.0.0.1", host, cfg, status_cb, NULL);
+ GNUNET_TESTBED_controller_start ("127.0.0.1", host, status_cb, NULL);
}