- for (c_m = 0; c_m < num_masters; c_m++)
- {
- if (NULL != mps[c_m].peer_id_op)
- {
- GNUNET_TESTBED_operation_done (mps[c_m].peer_id_op);
- mps[c_m].peer_id_op = NULL;
- }
-
- if (GNUNET_SCHEDULER_NO_TASK != mps[c_m].ats_task)
- GNUNET_SCHEDULER_cancel (mps[c_m].ats_task);
- mps[c_m].ats_task = GNUNET_SCHEDULER_NO_TASK;
-
- for (c_op = 0; c_op < num_slaves; c_op++)
- {
-
- if (NULL != mps[c_m].partners[c_op].cth)
- {
- GNUNET_CORE_notify_transmit_ready_cancel (mps[c_m].partners[c_op].cth);
- mps[c_m].partners[c_op].cth = NULL;
- }
- if (NULL != mps[c_m].partners[c_op].tth)
- {
- GNUNET_TRANSPORT_notify_transmit_ready_cancel (mps[c_m].partners[c_op].tth);
- mps[c_m].partners[c_op].tth = NULL;
- }
-
-
- if (NULL != mps[c_m].core_connect_ops[c_op].connect_op)
- {
- GNUNET_log(GNUNET_ERROR_TYPE_INFO,
- _("Failed to connect peer 0 and %u\n"), c_op);
- GNUNET_TESTBED_operation_done (
- mps[c_m].core_connect_ops[c_op].connect_op);
- mps[c_m].core_connect_ops[c_op].connect_op = NULL;
- result = 1;
- }
- }
-
- if (NULL != mps[c_m].ats_perf_op)
- {
- GNUNET_TESTBED_operation_done (mps[c_m].ats_perf_op);
- mps[c_m].ats_perf_op = NULL;
- }
-
- if (NULL != mps[c_m].comm_op)
- {
- GNUNET_TESTBED_operation_done (mps[c_m].comm_op);
- mps[c_m].comm_op = NULL;
- }
- GNUNET_free(mps[c_m].core_connect_ops);
- GNUNET_free(mps[c_m].partners);
- mps[c_m].partners = NULL;
- }
-
- for (c_s = 0; c_s < num_slaves; c_s++)
- {
- if (NULL != sps[c_s].peer_id_op)
- {
- GNUNET_TESTBED_operation_done (sps[c_s].peer_id_op);
- sps[c_s].peer_id_op = NULL;
- }
-
- for (c_op = 0; c_op < num_slaves; c_op++)
- {
- if (NULL != sps[c_s].partners[c_op].cth)
- {
- GNUNET_CORE_notify_transmit_ready_cancel (sps[c_s].partners[c_op].cth);
- sps[c_s].partners[c_op].cth = NULL;
- }
-
- if (NULL != sps[c_s].partners[c_op].tth)
- {
- GNUNET_TRANSPORT_notify_transmit_ready_cancel (sps[c_s].partners[c_op].tth);
- sps[c_s].partners[c_op].tth = NULL;
- }
- }
-
- if (NULL != sps[c_s].ats_perf_op)
- {
- GNUNET_TESTBED_operation_done (sps[c_s].ats_perf_op);
- sps[c_s].ats_perf_op = NULL;
- }
- if (NULL != sps[c_s].comm_op)
- {
- GNUNET_TESTBED_operation_done (sps[c_s].comm_op);
- sps[c_s].comm_op = NULL;
- }
-
- GNUNET_free(sps[c_s].partners);
- sps[c_s].partners = NULL;
- }
-
- GNUNET_SCHEDULER_shutdown ();
-}
-
-static struct BenchmarkPeer *
-find_peer (const struct GNUNET_PeerIdentity * peer)
-{
- int c_p;
-
- for (c_p = 0; c_p < num_masters; c_p++)
- {
- if (0 == memcmp (&mps[c_p].id, peer, sizeof(struct GNUNET_PeerIdentity)))
- return &mps[c_p];
- }
-
- for (c_p = 0; c_p < num_slaves; c_p++)
- {
- if (0 == memcmp (&sps[c_p].id, peer, sizeof(struct GNUNET_PeerIdentity)))
- return &sps[c_p];
- }
- return NULL ;