gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: config: file name expansion


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: config: file name expansion in all -f cases
Date: Thu, 07 Jun 2018 17:23:49 +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 2cdccc796 config: file name expansion in all -f cases
2cdccc796 is described below

commit 2cdccc796f93117f5c74ec3b586f7654307b02e0
Author: Julius Bünger <address@hidden>
AuthorDate: Thu Jun 7 17:22:22 2018 +0200

    config: file name expansion in all -f cases
---
 src/util/gnunet-config.c | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c
index 81e09fdbf..c01528a45 100644
--- a/src/util/gnunet-config.c
+++ b/src/util/gnunet-config.c
@@ -72,12 +72,28 @@ print_option (void *cls,
              const char *option,
              const char *value)
 {
-  (void) cls;
   (void) section;
-  fprintf (stdout,
-          "%s = %s\n",
-          option,
-          value);
+  const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
+  char *value_fn;
+  if (is_filename)
+  {
+    GNUNET_assert (GNUNET_OK ==
+        GNUNET_CONFIGURATION_get_value_filename (cfg,
+                                                 section,
+                                                 option,
+                                                 &value_fn));
+    fprintf (stdout,
+       "%s = %s\n",
+       option,
+       GNUNET_STRINGS_filename_expand (value_fn));
+  }
+  else
+  {
+    fprintf (stdout,
+       "%s = %s\n",
+       option,
+       value);
+  }
 }
 
 
@@ -156,8 +172,8 @@ run (void *cls,
     {
       GNUNET_CONFIGURATION_iterate_section_values (cfg,
                                                    section,
-                                                  &print_option,
-                                                   NULL);
+                                                  &print_option,
+                                                   (void *) cfg);
     }
     else
     {

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



reply via email to

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