gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: TNG testing: Specify config


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: TNG testing: Specify config source differently
Date: Thu, 18 Apr 2019 10:57:40 +0200

This is an automated email from the git hooks/post-receive script.

julius-buenger pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 600641890 TNG testing: Specify config source differently
600641890 is described below

commit 6006418909cef503a9e026fde4a9f7d4862d2c01
Author: Julius Bünger <address@hidden>
AuthorDate: Thu Apr 18 10:56:46 2019 +0200

    TNG testing: Specify config source differently
---
 src/transport/test_communicator_unix.c |  2 +-
 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)
 
   GNUNET_TRANSPORT_TESTING_transport_communicator_service_start (
       "transport",
-      cfg,
+      "test_communicator_1.conf",
       &communicator_available,
       NULL); /* cls */
 }
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);
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]