diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-08-17 12:32:44 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-08-17 12:32:44 +0000 |
commit | d6f2d6cd9b3a14e9dc7cea1e5d1863d6d59af0af (patch) | |
tree | 07f12cb35c32734f25a3a0e4317ee0559168b2d7 /src/testbed | |
parent | 7cd1ffc72cf73bdce3cc9d6f2ccdd3cd641d8f76 (diff) | |
download | gnunet-d6f2d6cd9b3a14e9dc7cea1e5d1863d6d59af0af.tar.gz gnunet-d6f2d6cd9b3a14e9dc7cea1e5d1863d6d59af0af.zip |
fixes
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/gnunet-service-testbed.c | 2 | ||||
-rw-r--r-- | src/testbed/gnunet-testbed-helper.c | 1 | ||||
-rw-r--r-- | src/testbed/test_testbed_api_controllerlink.c | 2 | ||||
-rw-r--r-- | src/testbed/testbed_api.c | 5 | ||||
-rw-r--r-- | src/testbed/testbed_api_hosts.c | 6 |
5 files changed, 10 insertions, 6 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index e66802dca..c9f8436e6 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c | |||
@@ -2253,7 +2253,7 @@ testbed_run (void *cls, | |||
2253 | */ | 2253 | */ |
2254 | int main (int argc, char *const *argv) | 2254 | int main (int argc, char *const *argv) |
2255 | { | 2255 | { |
2256 | //sleep (30); /* Debugging */ | 2256 | //sleep (15); /* Debugging */ |
2257 | return | 2257 | return |
2258 | (GNUNET_OK == | 2258 | (GNUNET_OK == |
2259 | GNUNET_SERVICE_run (argc, | 2259 | GNUNET_SERVICE_run (argc, |
diff --git a/src/testbed/gnunet-testbed-helper.c b/src/testbed/gnunet-testbed-helper.c index 215f680b3..94a384ab2 100644 --- a/src/testbed/gnunet-testbed-helper.c +++ b/src/testbed/gnunet-testbed-helper.c | |||
@@ -422,7 +422,6 @@ int main (int argc, char **argv) | |||
422 | 422 | ||
423 | status = GNUNET_OK; | 423 | status = GNUNET_OK; |
424 | in_shutdown = GNUNET_NO; | 424 | in_shutdown = GNUNET_NO; |
425 | //sleep (60); | ||
426 | shc_chld = | 425 | shc_chld = |
427 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); | 426 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); |
428 | ret = GNUNET_PROGRAM_run (argc, argv, "gnunet-testbed-helper", | 427 | ret = GNUNET_PROGRAM_run (argc, argv, "gnunet-testbed-helper", |
diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c index e9ef4dac9..bda27d8cf 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c | |||
@@ -191,7 +191,7 @@ registration_cont (void *cls, const char *emsg) | |||
191 | GNUNET_TESTBED_controller_link (mc, slave, NULL, cfg, GNUNET_YES); | 191 | GNUNET_TESTBED_controller_link (mc, slave, NULL, cfg, GNUNET_YES); |
192 | result = SUCCESS; | 192 | result = SUCCESS; |
193 | GNUNET_SCHEDULER_add_delayed | 193 | GNUNET_SCHEDULER_add_delayed |
194 | (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3), | 194 | (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10), |
195 | &do_shutdown, NULL); | 195 | &do_shutdown, NULL); |
196 | break; | 196 | break; |
197 | case INIT: | 197 | case INIT: |
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 691ab5a17..afac22fba 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -945,6 +945,7 @@ helper_exp_cb (void *cls) | |||
945 | 945 | ||
946 | cb = cp->cb; | 946 | cb = cp->cb; |
947 | cb_cls = cp->cls; | 947 | cb_cls = cp->cls; |
948 | cp->helper = NULL; | ||
948 | GNUNET_TESTBED_controller_stop (cp); | 949 | GNUNET_TESTBED_controller_stop (cp); |
949 | if (NULL != cb) | 950 | if (NULL != cb) |
950 | cb (cb_cls, NULL, GNUNET_SYSERR); | 951 | cb (cb_cls, NULL, GNUNET_SYSERR); |
@@ -1006,6 +1007,7 @@ GNUNET_TESTBED_controller_start (const char *controller_ip, | |||
1006 | GNUNET_asprintf (&cp->dst, "%s", hostname); | 1007 | GNUNET_asprintf (&cp->dst, "%s", hostname); |
1007 | else | 1008 | else |
1008 | GNUNET_asprintf (&cp->dst, "%s@%s", username, hostname); | 1009 | GNUNET_asprintf (&cp->dst, "%s@%s", username, hostname); |
1010 | LOG_DEBUG ("Starting SSH to destination %s\n", cp->dst); | ||
1009 | argp = 0; | 1011 | argp = 0; |
1010 | remote_args[argp++] = "ssh"; | 1012 | remote_args[argp++] = "ssh"; |
1011 | remote_args[argp++] = "-p"; | 1013 | remote_args[argp++] = "-p"; |
@@ -1054,7 +1056,8 @@ GNUNET_TESTBED_controller_stop (struct GNUNET_TESTBED_ControllerProc *cproc) | |||
1054 | { | 1056 | { |
1055 | if (NULL != cproc->shandle) | 1057 | if (NULL != cproc->shandle) |
1056 | GNUNET_HELPER_send_cancel (cproc->shandle); | 1058 | GNUNET_HELPER_send_cancel (cproc->shandle); |
1057 | GNUNET_HELPER_stop (cproc->helper); | 1059 | if (NULL != cproc->helper) |
1060 | GNUNET_HELPER_stop (cproc->helper); | ||
1058 | if (NULL != cproc->cfg) | 1061 | if (NULL != cproc->cfg) |
1059 | GNUNET_CONFIGURATION_destroy (cproc->cfg); | 1062 | GNUNET_CONFIGURATION_destroy (cproc->cfg); |
1060 | GNUNET_free_non_null (cproc->port); | 1063 | GNUNET_free_non_null (cproc->port); |
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 817abd8e9..27731caf8 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c | |||
@@ -242,8 +242,8 @@ GNUNET_TESTBED_host_create_with_id (uint32_t id, | |||
242 | return NULL; | 242 | return NULL; |
243 | } | 243 | } |
244 | host = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host)); | 244 | host = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Host)); |
245 | host->hostname = hostname; | 245 | host->hostname = (NULL != hostname) ? GNUNET_strdup (hostname) : NULL; |
246 | host->username = username; | 246 | host->username = (NULL != username) ? GNUNET_strdup (username) : NULL; |
247 | host->id = id; | 247 | host->id = id; |
248 | host->port = (0 == port) ? 22 : port; | 248 | host->port = (0 == port) ? 22 : port; |
249 | new_size = host_list_size; | 249 | new_size = host_list_size; |
@@ -326,6 +326,8 @@ GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) | |||
326 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); | 326 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); |
327 | GNUNET_free (rc); | 327 | GNUNET_free (rc); |
328 | } | 328 | } |
329 | GNUNET_free_non_null ((char *) host->username); | ||
330 | GNUNET_free_non_null ((char *) host->hostname); | ||
329 | GNUNET_free (host); | 331 | GNUNET_free (host); |
330 | while (host_list_size >= HOST_LIST_GROW_STEP) | 332 | while (host_list_size >= HOST_LIST_GROW_STEP) |
331 | { | 333 | { |