diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-08-14 14:25:43 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-08-14 14:25:43 +0000 |
commit | 5d9e9fcf45766b369f2d6009da89977616447222 (patch) | |
tree | b41804bfba0ad876148dae68d6efb840b007eb7c /src/testbed | |
parent | 21bb57f2dd89640083dbd0478322924e4b8ad164 (diff) | |
download | gnunet-5d9e9fcf45766b369f2d6009da89977616447222.tar.gz gnunet-5d9e9fcf45766b369f2d6009da89977616447222.zip |
fixes
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/gnunet-service-testbed.c | 6 | ||||
-rw-r--r-- | src/testbed/test_testbed_api_controllerlink.c | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 7398ee19c..e66802dca 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c | |||
@@ -1108,7 +1108,11 @@ handle_add_host (void *cls, | |||
1108 | LOG_DEBUG ("-------host id: %u\n", host_id); | 1108 | LOG_DEBUG ("-------host id: %u\n", host_id); |
1109 | if (NULL != hostname) LOG_DEBUG ("-------hostname: %s\n", hostname); | 1109 | if (NULL != hostname) LOG_DEBUG ("-------hostname: %s\n", hostname); |
1110 | if (0 != username_length) LOG_DEBUG ("-------username: %s\n", username); | 1110 | if (0 != username_length) LOG_DEBUG ("-------username: %s\n", username); |
1111 | else LOG_DEBUG ("-------username: NULL\n"); | 1111 | else |
1112 | { | ||
1113 | LOG_DEBUG ("-------username: NULL\n"); | ||
1114 | username = NULL; | ||
1115 | } | ||
1112 | LOG_DEBUG ("-------ssh port: %u\n", ntohs (msg->ssh_port)); | 1116 | LOG_DEBUG ("-------ssh port: %u\n", ntohs (msg->ssh_port)); |
1113 | host = GNUNET_TESTBED_host_create_with_id (host_id, hostname, username, | 1117 | host = GNUNET_TESTBED_host_create_with_id (host_id, hostname, username, |
1114 | ntohs (msg->ssh_port)); | 1118 | ntohs (msg->ssh_port)); |
diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c index 99f0d7fd9..e9ef4dac9 100644 --- a/src/testbed/test_testbed_api_controllerlink.c +++ b/src/testbed/test_testbed_api_controllerlink.c | |||
@@ -126,16 +126,16 @@ do_shutdown (void *cls, const const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
126 | { | 126 | { |
127 | if (GNUNET_SCHEDULER_NO_TASK != abort_task) | 127 | if (GNUNET_SCHEDULER_NO_TASK != abort_task) |
128 | GNUNET_SCHEDULER_cancel (abort_task); | 128 | GNUNET_SCHEDULER_cancel (abort_task); |
129 | if (NULL != mc) | 129 | if (NULL != slave) |
130 | GNUNET_TESTBED_controller_disconnect (mc); | ||
131 | if (NULL != cp) | ||
132 | GNUNET_TESTBED_controller_stop (cp); | ||
133 | if (NULL != slave) | ||
134 | GNUNET_TESTBED_host_destroy (slave); | 130 | GNUNET_TESTBED_host_destroy (slave); |
135 | if (NULL != host) | 131 | if (NULL != host) |
136 | GNUNET_TESTBED_host_destroy (host); | 132 | GNUNET_TESTBED_host_destroy (host); |
133 | if (NULL != mc) | ||
134 | GNUNET_TESTBED_controller_disconnect (mc); | ||
137 | if (NULL != cfg) | 135 | if (NULL != cfg) |
138 | GNUNET_CONFIGURATION_destroy (cfg); | 136 | GNUNET_CONFIGURATION_destroy (cfg); |
137 | if (NULL != cp) | ||
138 | GNUNET_TESTBED_controller_stop (cp); | ||
139 | if (NULL != rh) | 139 | if (NULL != rh) |
140 | GNUNET_TESTBED_cancel_registration (rh); | 140 | GNUNET_TESTBED_cancel_registration (rh); |
141 | 141 | ||
@@ -250,7 +250,7 @@ static void | |||
250 | run (void *cls, char *const *args, const char *cfgfile, | 250 | run (void *cls, char *const *args, const char *cfgfile, |
251 | const struct GNUNET_CONFIGURATION_Handle *config) | 251 | const struct GNUNET_CONFIGURATION_Handle *config) |
252 | { | 252 | { |
253 | host = GNUNET_TESTBED_host_create ("127.0.0.1", NULL, 0); | 253 | host = GNUNET_TESTBED_host_create (NULL, NULL, 0); |
254 | GNUNET_assert (NULL != host); | 254 | GNUNET_assert (NULL != host); |
255 | cfg = GNUNET_CONFIGURATION_dup (config); | 255 | cfg = GNUNET_CONFIGURATION_dup (config); |
256 | cp = | 256 | cp = |