/**
* Assuming all peers have been destroyed cleanup run handle
*
- * @param cls the run handle
+ * @param rc the run context
*/
static void
-cleanup (void *cls)
+cleanup (struct GNUNET_TESTBED_RunHandle *rc)
{
- struct GNUNET_TESTBED_RunHandle *rc = cls;
unsigned int hid;
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == rc->register_hosts_task);
if (NULL == rc->peers)
goto cleanup_;
rc->shutdown = GNUNET_YES;
- rcop = GNUNET_malloc (sizeof (struct RunContextOperation));
+ rcop = GNUNET_new (struct RunContextOperation);
rcop->rc = rc;
rcop->op = GNUNET_TESTBED_shutdown_peers (rc->c, rcop, NULL, NULL);
GNUNET_assert (NULL != rcop->op);
rc->pstart_time = GNUNET_TIME_absolute_get ();
for (peer = 0; peer < rc->num_peers; peer++)
{
- rcop = GNUNET_malloc (sizeof (struct RunContextOperation));
+ rcop = GNUNET_new (struct RunContextOperation);
rcop->rc = rc;
rcop->op = GNUNET_TESTBED_peer_start (NULL, rc->peers[peer], NULL, NULL);
GNUNET_assert (NULL != rcop->op);
rc->peer_count = 0;
for (peer = 0; peer < rc->num_peers; peer++)
{
- rcop = GNUNET_malloc (sizeof (struct RunContextOperation));
+ rcop = GNUNET_new (struct RunContextOperation);
rcop->rc = rc;
rcop->op =
GNUNET_TESTBED_peer_create (rc->c,
/* Start slaves */
for (slave = 0; slave < rc->num_hosts; slave++)
{
- rcop = GNUNET_malloc (sizeof (struct RunContextOperation));
+ rcop = GNUNET_new (struct RunContextOperation);
rcop->rc = rc;
rcop->op =
GNUNET_TESTBED_controller_link (rcop, rc->c, rc->hosts[slave],
unsigned int nhost;
GNUNET_assert (num_peers > 0);
- rc = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_RunHandle));
+ rc = GNUNET_new (struct GNUNET_TESTBED_RunHandle);
rc->cfg = GNUNET_CONFIGURATION_dup (cfg);
#if ENABLE_SUPERMUC
rc->num_hosts = GNUNET_TESTBED_hosts_load_from_loadleveler (rc->cfg,
break;
case GNUNET_TESTBED_TOPOLOGY_FROM_FILE:
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (rc->cfg, TESTBED_CONFIG_SECTION,
+ GNUNET_CONFIGURATION_get_value_filename (rc->cfg, TESTBED_CONFIG_SECTION,
"OVERLAY_TOPOLOGY_FILE",
&rc->topo_file))
{