diff options
Diffstat (limited to 'src/testbed/testbed_api_hosts.c')
-rw-r--r-- | src/testbed/testbed_api_hosts.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 8af8e23d0..5a5b00e5a 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c | |||
@@ -331,7 +331,7 @@ GNUNET_TESTBED_host_create_with_id (uint32_t id, const char *hostname, | |||
331 | LOG (GNUNET_ERROR_TYPE_WARNING, "Host with id: %u already created\n", id); | 331 | LOG (GNUNET_ERROR_TYPE_WARNING, "Host with id: %u already created\n", id); |
332 | return NULL; | 332 | return NULL; |
333 | } | 333 | } |
334 | host = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host)); | 334 | host = GNUNET_new (struct GNUNET_TESTBED_Host); |
335 | host->hostname = (NULL != hostname) ? GNUNET_strdup (hostname) : NULL; | 335 | host->hostname = (NULL != hostname) ? GNUNET_strdup (hostname) : NULL; |
336 | host->username = (NULL != username) ? GNUNET_strdup (username) : NULL; | 336 | host->username = (NULL != username) ? GNUNET_strdup (username) : NULL; |
337 | host->id = id; | 337 | host->id = id; |
@@ -649,7 +649,7 @@ GNUNET_TESTBED_mark_host_registered_at_ (struct GNUNET_TESTBED_Host *host, | |||
649 | return; | 649 | return; |
650 | } | 650 | } |
651 | } | 651 | } |
652 | rc = GNUNET_malloc (sizeof (struct RegisteredController)); | 652 | rc = GNUNET_new (struct RegisteredController); |
653 | rc->controller = controller; | 653 | rc->controller = controller; |
654 | GNUNET_CONTAINER_DLL_insert_tail (host->rc_head, host->rc_tail, rc); | 654 | GNUNET_CONTAINER_DLL_insert_tail (host->rc_head, host->rc_tail, rc); |
655 | } | 655 | } |
@@ -1079,7 +1079,7 @@ GNUNET_TESTBED_controller_start (const char *trusted_ip, | |||
1079 | host->locked = GNUNET_YES; | 1079 | host->locked = GNUNET_YES; |
1080 | API_VIOLATION (GNUNET_NO == host->controller_started, | 1080 | API_VIOLATION (GNUNET_NO == host->controller_started, |
1081 | "Attempting to start a controller on a host which is already started a controller"); | 1081 | "Attempting to start a controller on a host which is already started a controller"); |
1082 | cp = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_ControllerProc)); | 1082 | cp = GNUNET_new (struct GNUNET_TESTBED_ControllerProc); |
1083 | if (0 == GNUNET_TESTBED_host_get_id_ (host)) | 1083 | if (0 == GNUNET_TESTBED_host_get_id_ (host)) |
1084 | { | 1084 | { |
1085 | cp->helper = | 1085 | cp->helper = |
@@ -1324,7 +1324,7 @@ GNUNET_TESTBED_is_host_habitable (const struct GNUNET_TESTBED_Host *host, | |||
1324 | const char *hostname; | 1324 | const char *hostname; |
1325 | char *port; | 1325 | char *port; |
1326 | 1326 | ||
1327 | h = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_HostHabitableCheckHandle)); | 1327 | h = GNUNET_new (struct GNUNET_TESTBED_HostHabitableCheckHandle); |
1328 | h->cb = cb; | 1328 | h->cb = cb; |
1329 | h->cb_cls = cb_cls; | 1329 | h->cb_cls = cb_cls; |
1330 | h->host = host; | 1330 | h->host = host; |
@@ -1449,7 +1449,7 @@ GNUNET_TESTBED_register_host (struct GNUNET_TESTBED_Controller *controller, | |||
1449 | (NULL == hostname) ? "localhost" : hostname); | 1449 | (NULL == hostname) ? "localhost" : hostname); |
1450 | return NULL; | 1450 | return NULL; |
1451 | } | 1451 | } |
1452 | rh = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_HostRegistrationHandle)); | 1452 | rh = GNUNET_new (struct GNUNET_TESTBED_HostRegistrationHandle); |
1453 | rh->host = host; | 1453 | rh->host = host; |
1454 | rh->c = controller; | 1454 | rh->c = controller; |
1455 | GNUNET_assert (NULL != cc); | 1455 | GNUNET_assert (NULL != cc); |