aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/test_testbed_api.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-07-17 14:59:10 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-07-17 14:59:10 +0000
commiteb3f4006fc74ef71296e53d83b1d4b6990b639d1 (patch)
tree39704da526a6107925ebec9684d6a1e7d65f6e4e /src/testbed/test_testbed_api.c
parent90b5375e31986484f5007ec62c57f455bb8178dc (diff)
downloadgnunet-eb3f4006fc74ef71296e53d83b1d4b6990b639d1.tar.gz
gnunet-eb3f4006fc74ef71296e53d83b1d4b6990b639d1.zip
helper integration to GNUNET_TESTBED_host_run_()
todo: add controller start callback with the configuration with which the controller is started
Diffstat (limited to 'src/testbed/test_testbed_api.c')
-rw-r--r--src/testbed/test_testbed_api.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/testbed/test_testbed_api.c b/src/testbed/test_testbed_api.c
index 849f5ddd4..9bdae1fb0 100644
--- a/src/testbed/test_testbed_api.c
+++ b/src/testbed/test_testbed_api.c
@@ -43,11 +43,6 @@
43 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, sec) 43 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, sec)
44 44
45/** 45/**
46 * The testing system we work with
47 */
48struct GNUNET_TESTING_System *test_system;
49
50/**
51 * Our localhost 46 * Our localhost
52 */ 47 */
53static struct GNUNET_TESTBED_Host *host; 48static struct GNUNET_TESTBED_Host *host;
@@ -117,7 +112,6 @@ do_shutdown (void *cls, const const struct GNUNET_SCHEDULER_TaskContext *tc)
117 GNUNET_TESTBED_controller_stop (cp); 112 GNUNET_TESTBED_controller_stop (cp);
118 GNUNET_TESTBED_host_destroy (neighbour); 113 GNUNET_TESTBED_host_destroy (neighbour);
119 GNUNET_TESTBED_host_destroy (host); 114 GNUNET_TESTBED_host_destroy (host);
120 GNUNET_TESTING_system_destroy (test_system, GNUNET_YES);
121} 115}
122 116
123 117
@@ -190,12 +184,10 @@ run (void *cls, char *const *args, const char *cfgfile,
190{ 184{
191 uint64_t event_mask; 185 uint64_t event_mask;
192 186
193 test_system = GNUNET_TESTING_system_create ("test_testbed",
194 "127.0.0.1");
195 host = GNUNET_TESTBED_host_create (NULL, NULL, 0); 187 host = GNUNET_TESTBED_host_create (NULL, NULL, 0);
196 GNUNET_assert (NULL != host); 188 GNUNET_assert (NULL != host);
197 cfg = GNUNET_CONFIGURATION_dup (config); 189 cfg = GNUNET_CONFIGURATION_dup (config);
198 cp = GNUNET_TESTBED_controller_start (test_system, host, cfg, NULL, NULL); 190 cp = GNUNET_TESTBED_controller_start ("127.0.0.1", host, cfg, NULL, NULL);
199 event_mask = 0; 191 event_mask = 0;
200 event_mask |= (1L << GNUNET_TESTBED_ET_PEER_START); 192 event_mask |= (1L << GNUNET_TESTBED_ET_PEER_START);
201 event_mask |= (1L << GNUNET_TESTBED_ET_PEER_STOP); 193 event_mask |= (1L << GNUNET_TESTBED_ET_PEER_STOP);