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/testbed_api_testbed.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/testbed_api_testbed.c')
-rw-r--r-- | src/testbed/testbed_api_testbed.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index a2f60c8cc..d57c3bf4c 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -1049,10 +1049,12 @@ GNUNET_TESTBED_run (const char *host_filename, | |||
1049 | 1049 | ||
1050 | GNUNET_assert (num_peers > 0); | 1050 | GNUNET_assert (num_peers > 0); |
1051 | rc = GNUNET_malloc (sizeof (struct RunContext)); | 1051 | rc = GNUNET_malloc (sizeof (struct RunContext)); |
1052 | rc->cfg = GNUNET_CONFIGURATION_dup (cfg); | ||
1052 | if (NULL != host_filename) | 1053 | if (NULL != host_filename) |
1053 | { | 1054 | { |
1054 | rc->num_hosts = | 1055 | rc->num_hosts = |
1055 | GNUNET_TESTBED_hosts_load_from_file (host_filename, &rc->hosts); | 1056 | GNUNET_TESTBED_hosts_load_from_file (host_filename, rc->cfg, |
1057 | &rc->hosts); | ||
1056 | if (0 == rc->num_hosts) | 1058 | if (0 == rc->num_hosts) |
1057 | { | 1059 | { |
1058 | LOG (GNUNET_ERROR_TYPE_WARNING, | 1060 | LOG (GNUNET_ERROR_TYPE_WARNING, |
@@ -1061,8 +1063,7 @@ GNUNET_TESTBED_run (const char *host_filename, | |||
1061 | } | 1063 | } |
1062 | } | 1064 | } |
1063 | else | 1065 | else |
1064 | rc->h = GNUNET_TESTBED_host_create (NULL, NULL, 0); | 1066 | rc->h = GNUNET_TESTBED_host_create (NULL, NULL, rc->cfg, 0); |
1065 | rc->cfg = GNUNET_CONFIGURATION_dup (cfg); | ||
1066 | rc->num_peers = num_peers; | 1067 | rc->num_peers = num_peers; |
1067 | rc->event_mask = event_mask; | 1068 | rc->event_mask = event_mask; |
1068 | rc->cc = cc; | 1069 | rc->cc = cc; |