/**
* @file testbed/test_testbed_api.c
* @brief testcases for the testbed api
- * @author Sree Harsha Totakura <sreeharsha@totakura.in>
+ * @author Sree Harsha Totakura
*/
#include "platform.h"
*/
static GNUNET_SCHEDULER_TaskIdentifier abort_task;
-/**
- * Peer destroy task identifier
- */
-static GNUNET_SCHEDULER_TaskIdentifier peer_destroy_task;
-
/**
* The testing result
*/
{
LOG (GNUNET_ERROR_TYPE_WARNING, "Test timedout -- Aborting\n");
abort_task = GNUNET_SCHEDULER_NO_TASK;
- if (GNUNET_SCHEDULER_NO_TASK != peer_destroy_task)
- GNUNET_SCHEDULER_cancel (peer_destroy_task);
do_shutdown (cls, tc);
}
}
-/**
- * Task for destroying the peer
- *
- * @param cls NULL
- * @param tc the task context
- */
-static void
-do_peer_destroy (void *cls,
- const const struct GNUNET_SCHEDULER_TaskContext *tc)
-{
- peer_destroy_task = GNUNET_SCHEDULER_NO_TASK;
- operation = GNUNET_TESTBED_peer_destroy (peer);
- GNUNET_assert (NULL != operation);
-}
-
-
/**
* Callback which will be called to after a host registration succeeded or failed
*
reg_handle = NULL;
peer = GNUNET_TESTBED_peer_create (controller, host, cfg);
GNUNET_assert (NULL != peer);
- peer_destroy_task =
- GNUNET_SCHEDULER_add_now (&do_peer_destroy, NULL);
+ operation = GNUNET_TESTBED_peer_destroy (peer);
+ GNUNET_assert (NULL != operation);
}