summaryrefslogtreecommitdiff
path: root/src/transport/transport-testing2.c
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2019-04-18 10:56:46 +0200
committerJulius Bünger <buenger@mytum.de>2019-04-18 10:56:46 +0200
commit6006418909cef503a9e026fde4a9f7d4862d2c01 (patch)
tree7afb4f08971d8e22425613de9e4a52275945c1d8 /src/transport/transport-testing2.c
parent689458cd3f23833a8c26b2bb8161be773b5075e4 (diff)
TNG testing: Specify config source differently
Diffstat (limited to 'src/transport/transport-testing2.c')
-rw-r--r--src/transport/transport-testing2.c13
1 files changed, 12 insertions, 1 deletions
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)
struct GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *
GNUNET_TRANSPORT_TESTING_transport_communicator_service_start
(const char *service_name,
- struct GNUNET_CONFIGURATION_Handle *cfg,
+ struct GNUNET_CONFIGURATION_Handle *cfg_filename,
GNUNET_TRANSPORT_TESTING_CommunicatorAvailableCallback communicator_available,
//GNUNET_TRANSPORT_TESTING_Callback2 cb2,
//GNUNET_TRANSPORT_TESTING_Callback3 cb3,
//GNUNET_TRANSPORT_TESTING_Callback4 cb4,
void *cb_cls)
{
+ struct GNUNET_CONFIGURATION_Handle *cfg;
+ cfg = GNUNET_CONFIGURATION_create ();
+ if ( (GNUNET_SYSERR ==
+ GNUNET_CONFIGURATION_load (cfg,
+ cfg_filename)) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Malformed configuration file `%s', exit ...\n"),
+ cfg_filename);
+ return NULL;
+ }
/* Start communicator part of service */
transport_communicator_start (communicator_available, cfg);