diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-07-18 11:42:02 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-07-18 11:42:02 +0000 |
commit | efbf23f0bacbf0e2e877faf3cfa76ee65e159262 (patch) | |
tree | 2fe9f0938ccf79df446a10cdf50fb109270644fe /src/testbed/test_testbed_api.c | |
parent | 403036599d9327b6460ed3080162bad91e3c992a (diff) | |
download | gnunet-efbf23f0bacbf0e2e877faf3cfa76ee65e159262.tar.gz gnunet-efbf23f0bacbf0e2e877faf3cfa76ee65e159262.zip |
- remove dependency on DHT
Diffstat (limited to 'src/testbed/test_testbed_api.c')
-rw-r--r-- | src/testbed/test_testbed_api.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/testbed/test_testbed_api.c b/src/testbed/test_testbed_api.c index a82f48854..97ca15c5f 100644 --- a/src/testbed/test_testbed_api.c +++ b/src/testbed/test_testbed_api.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_dht_service.h" | 29 | #include "gnunet_arm_service.h" |
30 | #include "gnunet_testing_lib.h" | 30 | #include "gnunet_testing_lib.h" |
31 | #include "gnunet_testbed_service.h" | 31 | #include "gnunet_testbed_service.h" |
32 | 32 | ||
@@ -83,9 +83,9 @@ static struct GNUNET_CONFIGURATION_Handle *cfg; | |||
83 | static struct GNUNET_TESTBED_Operation *operation; | 83 | static struct GNUNET_TESTBED_Operation *operation; |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Handle to peer's DHT service | 86 | * Handle to peer's ARM service |
87 | */ | 87 | */ |
88 | static struct GNUNET_DHT_Handle *dht_handle; | 88 | static struct GNUNET_ARM_Handle *arm_handle; |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Abort task identifier | 91 | * Abort task identifier |
@@ -197,13 +197,13 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
197 | * @return service handle to return in 'op_result', NULL on error | 197 | * @return service handle to return in 'op_result', NULL on error |
198 | */ | 198 | */ |
199 | static void * | 199 | static void * |
200 | dht_connect_adapter (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) | 200 | arm_connect_adapter (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) |
201 | { | 201 | { |
202 | FAIL_TEST (NULL == cls, return NULL); | 202 | FAIL_TEST (NULL == cls, return NULL); |
203 | FAIL_TEST (OTHER == sub_test, return NULL); | 203 | FAIL_TEST (OTHER == sub_test, return NULL); |
204 | sub_test = PEER_SERVICE_CONNECT; | 204 | sub_test = PEER_SERVICE_CONNECT; |
205 | dht_handle = GNUNET_DHT_connect (cfg, 10); | 205 | arm_handle = GNUNET_ARM_connect (cfg, NULL, NULL); |
206 | return dht_handle; | 206 | return arm_handle; |
207 | } | 207 | } |
208 | 208 | ||
209 | 209 | ||
@@ -215,12 +215,12 @@ dht_connect_adapter (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
215 | * @param op_result service handle returned from the connect adapter | 215 | * @param op_result service handle returned from the connect adapter |
216 | */ | 216 | */ |
217 | static void | 217 | static void |
218 | dht_disconnect_adapter (void *cls, void *op_result) | 218 | arm_disconnect_adapter (void *cls, void *op_result) |
219 | { | 219 | { |
220 | FAIL_TEST (NULL != op_result, return); | 220 | FAIL_TEST (NULL != op_result, return); |
221 | FAIL_TEST (op_result == dht_handle, return); | 221 | FAIL_TEST (op_result == arm_handle, return); |
222 | GNUNET_DHT_disconnect (dht_handle); | 222 | GNUNET_ARM_disconnect_and_free (arm_handle); |
223 | dht_handle = NULL; | 223 | arm_handle = NULL; |
224 | FAIL_TEST (PEER_SERVICE_CONNECT == sub_test, return); | 224 | FAIL_TEST (PEER_SERVICE_CONNECT == sub_test, return); |
225 | FAIL_TEST (NULL != operation, return); | 225 | FAIL_TEST (NULL != operation, return); |
226 | operation = GNUNET_TESTBED_peer_stop (NULL, peer, NULL, NULL); | 226 | operation = GNUNET_TESTBED_peer_stop (NULL, peer, NULL, NULL); |
@@ -247,7 +247,7 @@ service_connect_comp_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
247 | FAIL_TEST (operation == op, return); | 247 | FAIL_TEST (operation == op, return); |
248 | FAIL_TEST (NULL == emsg, return); | 248 | FAIL_TEST (NULL == emsg, return); |
249 | FAIL_TEST (NULL == cls, return); | 249 | FAIL_TEST (NULL == cls, return); |
250 | FAIL_TEST (ca_result == dht_handle, return); | 250 | FAIL_TEST (ca_result == arm_handle, return); |
251 | GNUNET_TESTBED_operation_done (operation); /* This results in call to | 251 | GNUNET_TESTBED_operation_done (operation); /* This results in call to |
252 | * disconnect adapter */ | 252 | * disconnect adapter */ |
253 | break; | 253 | break; |
@@ -318,8 +318,8 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
318 | FAIL_TEST (event->op == operation, return); | 318 | FAIL_TEST (event->op == operation, return); |
319 | FAIL_TEST (NULL == event->op_cls, return); | 319 | FAIL_TEST (NULL == event->op_cls, return); |
320 | FAIL_TEST (NULL == event->details.operation_finished.emsg, return); | 320 | FAIL_TEST (NULL == event->details.operation_finished.emsg, return); |
321 | FAIL_TEST (NULL != dht_handle, return); | 321 | FAIL_TEST (NULL != arm_handle, return); |
322 | FAIL_TEST (event->details.operation_finished.generic == dht_handle, return); | 322 | FAIL_TEST (event->details.operation_finished.generic == arm_handle, return); |
323 | break; | 323 | break; |
324 | default: | 324 | default: |
325 | FAIL_TEST (0, return); | 325 | FAIL_TEST (0, return); |
@@ -334,8 +334,8 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
334 | operation = | 334 | operation = |
335 | GNUNET_TESTBED_service_connect (NULL, peer, "dht", | 335 | GNUNET_TESTBED_service_connect (NULL, peer, "dht", |
336 | &service_connect_comp_cb, NULL, | 336 | &service_connect_comp_cb, NULL, |
337 | &dht_connect_adapter, | 337 | &arm_connect_adapter, |
338 | &dht_disconnect_adapter, NULL); | 338 | &arm_disconnect_adapter, NULL); |
339 | FAIL_TEST (NULL != operation, return); | 339 | FAIL_TEST (NULL != operation, return); |
340 | break; | 340 | break; |
341 | case GNUNET_TESTBED_ET_PEER_STOP: | 341 | case GNUNET_TESTBED_ET_PEER_STOP: |