summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/gnunet-config.c30
1 files 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,
72 const char *option, 72 const char *option,
73 const char *value) 73 const char *value)
74{ 74{
75 (void) cls;
76 (void) section; 75 (void) section;
77 fprintf (stdout, 76 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
78 "%s = %s\n", 77 char *value_fn;
79 option, 78 if (is_filename)
80 value); 79 {
80 GNUNET_assert (GNUNET_OK ==
81 GNUNET_CONFIGURATION_get_value_filename (cfg,
82 section,
83 option,
84 &value_fn));
85 fprintf (stdout,
86 "%s = %s\n",
87 option,
88 GNUNET_STRINGS_filename_expand (value_fn));
89 }
90 else
91 {
92 fprintf (stdout,
93 "%s = %s\n",
94 option,
95 value);
96 }
81} 97}
82 98
83 99
@@ -156,8 +172,8 @@ run (void *cls,
156 { 172 {
157 GNUNET_CONFIGURATION_iterate_section_values (cfg, 173 GNUNET_CONFIGURATION_iterate_section_values (cfg,
158 section, 174 section,
159 &print_option, 175 &print_option,
160 NULL); 176 (void *) cfg);
161 } 177 }
162 else 178 else
163 { 179 {