diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-20 15:15:35 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-20 15:15:35 +0000 |
commit | a807aa20caec761b314a5eddcffbdd36650bd7d9 (patch) | |
tree | e68bc0be91a5db17740d71fa74ea132c7f3d13bc /src/testbed/test_testbed_api.c | |
parent | adf18305521dc87c4ca1aee82e910ff8e22199cc (diff) | |
download | gnunet-a807aa20caec761b314a5eddcffbdd36650bd7d9.tar.gz gnunet-a807aa20caec761b314a5eddcffbdd36650bd7d9.zip |
Assosiate a configuration template while creating hosts. This paves a way to
manage the configurations of controllers running on a host automatically.
modified ADD_HOST message structure to have host configuration. This feature is
yet to be implemented. The idea is that GNUNET_TESTBED_link_controllers()
should take no configuration when hosts automatically update configuration when
a new configuration is generated from a template.
Diffstat (limited to 'src/testbed/test_testbed_api.c')
-rw-r--r-- | src/testbed/test_testbed_api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testbed/test_testbed_api.c b/src/testbed/test_testbed_api.c index fabe956ca..2927c3798 100644 --- a/src/testbed/test_testbed_api.c +++ b/src/testbed/test_testbed_api.c | |||
@@ -407,7 +407,7 @@ registration_comp (void *cls, const char *emsg) | |||
407 | * GNUNET_TESTBED_controller_stop() shouldn't be called in this case | 407 | * GNUNET_TESTBED_controller_stop() shouldn't be called in this case |
408 | */ | 408 | */ |
409 | static void | 409 | static void |
410 | status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, int status) | 410 | status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg_, int status) |
411 | { | 411 | { |
412 | uint64_t event_mask; | 412 | uint64_t event_mask; |
413 | 413 | ||
@@ -423,10 +423,10 @@ status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, int status) | |||
423 | event_mask |= (1L << GNUNET_TESTBED_ET_CONNECT); | 423 | event_mask |= (1L << GNUNET_TESTBED_ET_CONNECT); |
424 | event_mask |= (1L << GNUNET_TESTBED_ET_OPERATION_FINISHED); | 424 | event_mask |= (1L << GNUNET_TESTBED_ET_OPERATION_FINISHED); |
425 | controller = | 425 | controller = |
426 | GNUNET_TESTBED_controller_connect (cfg, host, event_mask, &controller_cb, | 426 | GNUNET_TESTBED_controller_connect (cfg_, host, event_mask, &controller_cb, |
427 | NULL); | 427 | NULL); |
428 | FAIL_TEST (NULL != controller, return); | 428 | FAIL_TEST (NULL != controller, return); |
429 | neighbour = GNUNET_TESTBED_host_create ("localhost", NULL, 0); | 429 | neighbour = GNUNET_TESTBED_host_create ("localhost", NULL, cfg, 0); |
430 | FAIL_TEST (NULL != neighbour, return); | 430 | FAIL_TEST (NULL != neighbour, return); |
431 | reg_handle = | 431 | reg_handle = |
432 | GNUNET_TESTBED_register_host (controller, neighbour, ®istration_comp, | 432 | GNUNET_TESTBED_register_host (controller, neighbour, ®istration_comp, |
@@ -448,9 +448,9 @@ static void | |||
448 | run (void *cls, char *const *args, const char *cfgfile, | 448 | run (void *cls, char *const *args, const char *cfgfile, |
449 | const struct GNUNET_CONFIGURATION_Handle *config) | 449 | const struct GNUNET_CONFIGURATION_Handle *config) |
450 | { | 450 | { |
451 | host = GNUNET_TESTBED_host_create (NULL, NULL, 0); | ||
452 | FAIL_TEST (NULL != host, return); | ||
453 | cfg = GNUNET_CONFIGURATION_dup (config); | 451 | cfg = GNUNET_CONFIGURATION_dup (config); |
452 | host = GNUNET_TESTBED_host_create (NULL, NULL, cfg, 0); | ||
453 | FAIL_TEST (NULL != host, return); | ||
454 | cp = GNUNET_TESTBED_controller_start ("127.0.0.1", host, cfg, status_cb, | 454 | cp = GNUNET_TESTBED_controller_start ("127.0.0.1", host, cfg, status_cb, |
455 | NULL); | 455 | NULL); |
456 | abort_task = | 456 | abort_task = |