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_3peers_3controllers.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_3peers_3controllers.c')
-rw-r--r-- | src/testbed/test_testbed_api_3peers_3controllers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testbed/test_testbed_api_3peers_3controllers.c b/src/testbed/test_testbed_api_3peers_3controllers.c index 47ad81021..526386f01 100644 --- a/src/testbed/test_testbed_api_3peers_3controllers.c +++ b/src/testbed/test_testbed_api_3peers_3controllers.c | |||
@@ -736,7 +736,7 @@ registration_comp (void *cls, const char *emsg) | |||
736 | reg_handle = NULL; | 736 | reg_handle = NULL; |
737 | if (cls == neighbour1) | 737 | if (cls == neighbour1) |
738 | { | 738 | { |
739 | neighbour2 = GNUNET_TESTBED_host_create ("127.0.0.1", NULL, 0); | 739 | neighbour2 = GNUNET_TESTBED_host_create ("127.0.0.1", NULL, cfg, 0); |
740 | if (NULL == neighbour2) | 740 | if (NULL == neighbour2) |
741 | { | 741 | { |
742 | GNUNET_break (0); | 742 | GNUNET_break (0); |
@@ -812,7 +812,7 @@ status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *config, | |||
812 | return; | 812 | return; |
813 | } | 813 | } |
814 | result = CONTROLLER1_UP; | 814 | result = CONTROLLER1_UP; |
815 | neighbour1 = GNUNET_TESTBED_host_create ("127.0.0.1", NULL, 0); | 815 | neighbour1 = GNUNET_TESTBED_host_create ("127.0.0.1", NULL, cfg, 0); |
816 | if (NULL == neighbour1) | 816 | if (NULL == neighbour1) |
817 | { | 817 | { |
818 | GNUNET_break (0); | 818 | GNUNET_break (0); |
@@ -881,7 +881,8 @@ static void | |||
881 | run (void *cls, char *const *args, const char *cfgfile, | 881 | run (void *cls, char *const *args, const char *cfgfile, |
882 | const struct GNUNET_CONFIGURATION_Handle *config) | 882 | const struct GNUNET_CONFIGURATION_Handle *config) |
883 | { | 883 | { |
884 | host = GNUNET_TESTBED_host_create (NULL, NULL, 0); | 884 | cfg = GNUNET_CONFIGURATION_dup (config); |
885 | host = GNUNET_TESTBED_host_create (NULL, NULL, cfg, 0); | ||
885 | if (NULL == host) | 886 | if (NULL == host) |
886 | { | 887 | { |
887 | GNUNET_break (0); | 888 | GNUNET_break (0); |
@@ -902,7 +903,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
902 | result = SKIP; | 903 | result = SKIP; |
903 | return; | 904 | return; |
904 | } | 905 | } |
905 | cfg = GNUNET_CONFIGURATION_dup (config); | ||
906 | abort_task = | 906 | abort_task = |
907 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 907 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
908 | (GNUNET_TIME_UNIT_MINUTES, 3), &do_abort, | 908 | (GNUNET_TIME_UNIT_MINUTES, 3), &do_abort, |