diff options
author | Julius Bünger <buenger@mytum.de> | 2019-04-18 10:56:46 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2019-04-18 10:56:46 +0200 |
commit | 6006418909cef503a9e026fde4a9f7d4862d2c01 (patch) | |
tree | 7afb4f08971d8e22425613de9e4a52275945c1d8 /src/transport | |
parent | 689458cd3f23833a8c26b2bb8161be773b5075e4 (diff) | |
download | gnunet-6006418909cef503a9e026fde4a9f7d4862d2c01.tar.gz gnunet-6006418909cef503a9e026fde4a9f7d4862d2c01.zip |
TNG testing: Specify config source differently
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/test_communicator_unix.c | 2 | ||||
-rw-r--r-- | src/transport/transport-testing2.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/transport/test_communicator_unix.c b/src/transport/test_communicator_unix.c index f94587a12..ef7ed32c0 100644 --- a/src/transport/test_communicator_unix.c +++ b/src/transport/test_communicator_unix.c | |||
@@ -60,7 +60,7 @@ run (void *cls) | |||
60 | 60 | ||
61 | GNUNET_TRANSPORT_TESTING_transport_communicator_service_start ( | 61 | GNUNET_TRANSPORT_TESTING_transport_communicator_service_start ( |
62 | "transport", | 62 | "transport", |
63 | cfg, | 63 | "test_communicator_1.conf", |
64 | &communicator_available, | 64 | &communicator_available, |
65 | NULL); /* cls */ | 65 | NULL); /* cls */ |
66 | } | 66 | } |
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c index 0a7aa1da0..dbbc94c7f 100644 --- a/src/transport/transport-testing2.c +++ b/src/transport/transport-testing2.c | |||
@@ -220,14 +220,25 @@ communicator_start (const char *cfgname) | |||
220 | struct GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle * | 220 | struct GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle * |
221 | GNUNET_TRANSPORT_TESTING_transport_communicator_service_start | 221 | GNUNET_TRANSPORT_TESTING_transport_communicator_service_start |
222 | (const char *service_name, | 222 | (const char *service_name, |
223 | struct GNUNET_CONFIGURATION_Handle *cfg, | 223 | struct GNUNET_CONFIGURATION_Handle *cfg_filename, |
224 | GNUNET_TRANSPORT_TESTING_CommunicatorAvailableCallback communicator_available, | 224 | GNUNET_TRANSPORT_TESTING_CommunicatorAvailableCallback communicator_available, |
225 | //GNUNET_TRANSPORT_TESTING_Callback2 cb2, | 225 | //GNUNET_TRANSPORT_TESTING_Callback2 cb2, |
226 | //GNUNET_TRANSPORT_TESTING_Callback3 cb3, | 226 | //GNUNET_TRANSPORT_TESTING_Callback3 cb3, |
227 | //GNUNET_TRANSPORT_TESTING_Callback4 cb4, | 227 | //GNUNET_TRANSPORT_TESTING_Callback4 cb4, |
228 | void *cb_cls) | 228 | void *cb_cls) |
229 | { | 229 | { |
230 | struct GNUNET_CONFIGURATION_Handle *cfg; | ||
230 | 231 | ||
232 | cfg = GNUNET_CONFIGURATION_create (); | ||
233 | if ( (GNUNET_SYSERR == | ||
234 | GNUNET_CONFIGURATION_load (cfg, | ||
235 | cfg_filename)) ) | ||
236 | { | ||
237 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
238 | _("Malformed configuration file `%s', exit ...\n"), | ||
239 | cfg_filename); | ||
240 | return NULL; | ||
241 | } | ||
231 | /* Start communicator part of service */ | 242 | /* Start communicator part of service */ |
232 | transport_communicator_start (communicator_available, cfg); | 243 | transport_communicator_start (communicator_available, cfg); |
233 | 244 | ||