/*
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
/**
* The task for calling the continuation callback
*/
- GNUNET_SCHEDULER_TaskIdentifier call_completion_task_id;
+ struct GNUNET_SCHEDULER_Task * call_completion_task_id;
/**
* The number of peers present in the peers array. This number also
/**
* Task to mark the statistics service connect operation as done
*/
- GNUNET_SCHEDULER_TaskIdentifier op_done_task_id;
+ struct GNUNET_SCHEDULER_Task * op_done_task_id;
/**
* The index of this peer in the peers array of GetStatsContext
{
struct GetStatsContext *sc = cls;
- GNUNET_assert (sc->call_completion_task_id != GNUNET_SCHEDULER_NO_TASK);
- sc->call_completion_task_id = GNUNET_SCHEDULER_NO_TASK;
+ GNUNET_assert (sc->call_completion_task_id != NULL);
+ sc->call_completion_task_id = NULL;
LOG_DEBUG ("Calling get_statistics() continuation callback\n");
sc->cont (sc->cb_cls, sc->main_op, NULL);
}
struct GNUNET_TESTBED_Operation **op;
sc = peer_sc->sc;
- peer_sc->op_done_task_id = GNUNET_SCHEDULER_NO_TASK;
+ peer_sc->op_done_task_id = NULL;
op = &sc->ops[peer_sc->peer_index];
GNUNET_assert (NULL != *op);
GNUNET_TESTBED_operation_done (*op);
peer_sc->get_handle = NULL;
}
GNUNET_STATISTICS_destroy (sh, GNUNET_NO);
- if (GNUNET_SCHEDULER_NO_TASK != peer_sc->op_done_task_id)
+ if (NULL != peer_sc->op_done_task_id)
GNUNET_SCHEDULER_cancel (peer_sc->op_done_task_id);
GNUNET_free (peer_sc);
}
GNUNET_break (0);
continue;
}
- peer_sc = GNUNET_malloc (sizeof (struct PeerGetStatsContext));
+ peer_sc = GNUNET_new (struct PeerGetStatsContext);
peer_sc->sc = sc;
peer_sc->peer_index = peer;
sc->ops[peer] =
unsigned int peer;
LOG_DEBUG ("Cleaning up get_statistics operation\n");
- if (GNUNET_SCHEDULER_NO_TASK != sc->call_completion_task_id)
+ if (NULL != sc->call_completion_task_id)
GNUNET_SCHEDULER_cancel (sc->call_completion_task_id);
if (NULL != sc->ops)
{
if (NULL == no_wait_queue)
no_wait_queue = GNUNET_TESTBED_operation_queue_create_
(OPERATION_QUEUE_TYPE_FIXED, UINT_MAX);
- sc = GNUNET_malloc (sizeof (struct GetStatsContext));
+ sc = GNUNET_new (struct GetStatsContext);
sc->peers = peers;
sc->subsystem = (NULL == subsystem) ? NULL : GNUNET_strdup (subsystem);
sc->name = (NULL == name) ? NULL : GNUNET_strdup (name);