aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-service-testbed.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-12-19 06:00:23 +0000
committerLRN <lrn1986@gmail.com>2013-12-19 06:00:23 +0000
commite0ca7357cd0bfedc5c29cb731b56279fef8da059 (patch)
treeecfd47cf59bc00e656b53fd59c58f5038e342d65 /src/testbed/gnunet-service-testbed.c
parent92fd84dc7ef98452f848a62677c61a2b80b5835e (diff)
downloadgnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.tar.gz
gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.zip
malloc -> new
Diffstat (limited to 'src/testbed/gnunet-service-testbed.c')
-rw-r--r--src/testbed/gnunet-service-testbed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c
index 6f806e21b..a1d6aed09 100644
--- a/src/testbed/gnunet-service-testbed.c
+++ b/src/testbed/gnunet-service-testbed.c
@@ -191,7 +191,7 @@ GST_queue_message (struct GNUNET_SERVER_Client *client,
191 size = ntohs (msg->size); 191 size = ntohs (msg->size);
192 GNUNET_assert ((GNUNET_MESSAGE_TYPE_TESTBED_INIT <= type) && 192 GNUNET_assert ((GNUNET_MESSAGE_TYPE_TESTBED_INIT <= type) &&
193 (GNUNET_MESSAGE_TYPE_TESTBED_MAX > type)); 193 (GNUNET_MESSAGE_TYPE_TESTBED_MAX > type));
194 mq_entry = GNUNET_malloc (sizeof (struct MessageQueue)); 194 mq_entry = GNUNET_new (struct MessageQueue);
195 mq_entry->msg = msg; 195 mq_entry->msg = msg;
196 mq_entry->client = client; 196 mq_entry->client = client;
197 GNUNET_SERVER_client_keep (client); 197 GNUNET_SERVER_client_keep (client);
@@ -364,7 +364,7 @@ GST_queue_host_registration (struct Slave *slave,
364 "Queueing host registration for host %u at %u\n", 364 "Queueing host registration for host %u at %u\n",
365 GNUNET_TESTBED_host_get_id_ (host), 365 GNUNET_TESTBED_host_get_id_ (host),
366 GNUNET_TESTBED_host_get_id_ (GST_host_list[slave->host_id])); 366 GNUNET_TESTBED_host_get_id_ (GST_host_list[slave->host_id]));
367 hr = GNUNET_malloc (sizeof (struct HostRegistration)); 367 hr = GNUNET_new (struct HostRegistration);
368 hr->cb = cb; 368 hr->cb = cb;
369 hr->cb_cls = cb_cls; 369 hr->cb_cls = cb_cls;
370 hr->host = host; 370 hr->host = host;
@@ -525,7 +525,7 @@ handle_init (void *cls, struct GNUNET_SERVER_Client *client,
525 GNUNET_free (ss_str); 525 GNUNET_free (ss_str);
526 ss_str = NULL; 526 ss_str = NULL;
527 } 527 }
528 GST_context = GNUNET_malloc (sizeof (struct Context)); 528 GST_context = GNUNET_new (struct Context);
529 GNUNET_SERVER_client_keep (client); 529 GNUNET_SERVER_client_keep (client);
530 GST_context->client = client; 530 GST_context->client = client;
531 GST_context->host_id = ntohl (msg->host_id); 531 GST_context->host_id = ntohl (msg->host_id);