aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-service-testbed_oc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/gnunet-service-testbed_oc.c')
-rw-r--r--src/testbed/gnunet-service-testbed_oc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c
index 5ea6e48e1..c2978728c 100644
--- a/src/testbed/gnunet-service-testbed_oc.c
+++ b/src/testbed/gnunet-service-testbed_oc.c
@@ -444,7 +444,7 @@ GST_process_next_focc (struct RegisteredHostContext *rhc)
444 peer = GST_peer_list[focc->peer1]; 444 peer = GST_peer_list[focc->peer1];
445 GNUNET_assert (GNUNET_YES == peer->is_remote); 445 GNUNET_assert (GNUNET_YES == peer->is_remote);
446 GNUNET_assert (NULL != (slave = peer->details.remote.slave)); 446 GNUNET_assert (NULL != (slave = peer->details.remote.slave));
447 fopc = GNUNET_malloc (sizeof (struct ForwardedOperationContext)); 447 fopc = GNUNET_new (struct ForwardedOperationContext);
448 GNUNET_SERVER_client_keep (focc->client); 448 GNUNET_SERVER_client_keep (focc->client);
449 fopc->client = focc->client; 449 fopc->client = focc->client;
450 fopc->operation_id = focc->operation_id; 450 fopc->operation_id = focc->operation_id;
@@ -605,7 +605,7 @@ send_overlay_connect_success_msg (struct OverlayConnectContext *occ)
605 605
606 LOG_DEBUG ("0x%llx: Peers connected - Sending overlay connect success\n", 606 LOG_DEBUG ("0x%llx: Peers connected - Sending overlay connect success\n",
607 occ->op_id); 607 occ->op_id);
608 msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_ConnectionEventMessage)); 608 msg = GNUNET_new (struct GNUNET_TESTBED_ConnectionEventMessage);
609 msg->header.size = 609 msg->header.size =
610 htons (sizeof (struct GNUNET_TESTBED_ConnectionEventMessage)); 610 htons (sizeof (struct GNUNET_TESTBED_ConnectionEventMessage));
611 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT); 611 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT);
@@ -1223,7 +1223,7 @@ register_host (struct Slave *slave, struct GNUNET_TESTBED_Host *host)
1223 struct GNUNET_HashCode hash; 1223 struct GNUNET_HashCode hash;
1224 struct RegisteredHostContext *rhc; 1224 struct RegisteredHostContext *rhc;
1225 1225
1226 rhc = GNUNET_malloc (sizeof (struct RegisteredHostContext)); 1226 rhc = GNUNET_new (struct RegisteredHostContext);
1227 rhc->reg_host = host; 1227 rhc->reg_host = host;
1228 rhc->host = GST_host_list[slave->host_id]; 1228 rhc->host = GST_host_list[slave->host_id];
1229 GNUNET_assert (NULL != rhc->reg_host); 1229 GNUNET_assert (NULL != rhc->reg_host);
@@ -1304,7 +1304,7 @@ forward_overlay_connect (const struct GNUNET_TESTBED_OverlayConnectMessage *msg,
1304 GST_host_list[peer2_host_id]))) 1304 GST_host_list[peer2_host_id])))
1305 { 1305 {
1306 LOG_DEBUG ("Queueing forwarding FOCC for connecting peers %u and %u\n", p1, p2); 1306 LOG_DEBUG ("Queueing forwarding FOCC for connecting peers %u and %u\n", p1, p2);
1307 focc = GNUNET_malloc (sizeof (struct ForwardedOverlayConnectContext)); 1307 focc = GNUNET_new (struct ForwardedOverlayConnectContext);
1308 focc->peer1 = p1; 1308 focc->peer1 = p1;
1309 focc->peer2 = p2; 1309 focc->peer2 = p2;
1310 focc->peer2_host_id = peer2_host_id; 1310 focc->peer2_host_id = peer2_host_id;
@@ -1319,7 +1319,7 @@ forward_overlay_connect (const struct GNUNET_TESTBED_OverlayConnectMessage *msg,
1319 1319
1320 forward: 1320 forward:
1321 LOG_DEBUG ("Forwarding without FOCC for connecting peers %u and %u\n", p1, p2); 1321 LOG_DEBUG ("Forwarding without FOCC for connecting peers %u and %u\n", p1, p2);
1322 fopc = GNUNET_malloc (sizeof (struct ForwardedOperationContext)); 1322 fopc = GNUNET_new (struct ForwardedOperationContext);
1323 GNUNET_SERVER_client_keep (client); 1323 GNUNET_SERVER_client_keep (client);
1324 fopc->client = client; 1324 fopc->client = client;
1325 fopc->operation_id = op_id; 1325 fopc->operation_id = op_id;
@@ -1429,7 +1429,7 @@ GST_handle_overlay_connect (void *cls, struct GNUNET_SERVER_Client *client,
1429 return; 1429 return;
1430 } 1430 }
1431 p2n = NULL; 1431 p2n = NULL;
1432 occ = GNUNET_malloc (sizeof (struct OverlayConnectContext)); 1432 occ = GNUNET_new (struct OverlayConnectContext);
1433 occ->type = OCC_TYPE_LOCAL; 1433 occ->type = OCC_TYPE_LOCAL;
1434 if (!VALID_PEER_ID (p2)) /* May be peer2 is on a another controller */ 1434 if (!VALID_PEER_ID (p2)) /* May be peer2 is on a another controller */
1435 { 1435 {
@@ -1743,7 +1743,7 @@ GST_handle_remote_overlay_connect (void *cls,
1743 GNUNET_SERVER_receive_done (client, GNUNET_OK); 1743 GNUNET_SERVER_receive_done (client, GNUNET_OK);
1744 return; 1744 return;
1745 } 1745 }
1746 rocc = GNUNET_malloc (sizeof (struct RemoteOverlayConnectCtx)); 1746 rocc = GNUNET_new (struct RemoteOverlayConnectCtx);
1747 rocc->op_id = GNUNET_ntohll (msg->operation_id); 1747 rocc->op_id = GNUNET_ntohll (msg->operation_id);
1748 GNUNET_CONTAINER_DLL_insert_tail (roccq_head, roccq_tail, rocc); 1748 GNUNET_CONTAINER_DLL_insert_tail (roccq_head, roccq_tail, rocc);
1749 memcpy (&rocc->a_id, &msg->peer_identity, 1749 memcpy (&rocc->a_id, &msg->peer_identity,