diff options
author | Phil <phil.buschmann@tum.de> | 2018-07-02 15:42:34 +0200 |
---|---|---|
committer | Phil <phil.buschmann@tum.de> | 2018-07-02 15:42:34 +0200 |
commit | 6ede545d597509fefcc3d4fd2ef865bc5f57603f (patch) | |
tree | 3839f25c1a4b594a5da56df47b8ef5bd25880c76 /src/util/gnunet-config.c | |
parent | db8c5cd31a92cd18450bf9d2d595a8fd314583e0 (diff) | |
parent | bb3371542e3c1fff2c4abb4d2ba3decf925b4352 (diff) | |
download | gnunet-6ede545d597509fefcc3d4fd2ef865bc5f57603f.tar.gz gnunet-6ede545d597509fefcc3d4fd2ef865bc5f57603f.zip |
-Merge branch 'master' of ssh://gnunet.org/gnunet into gsoc2018/rest_api
Diffstat (limited to 'src/util/gnunet-config.c')
-rw-r--r-- | src/util/gnunet-config.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 16b826ee2..4528bbe24 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -75,27 +75,36 @@ print_option (void *cls, | |||
75 | const char *option, | 75 | const char *option, |
76 | const char *value) | 76 | const char *value) |
77 | { | 77 | { |
78 | (void) section; | ||
79 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 78 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
80 | char *value_fn; | 79 | |
80 | (void) section; | ||
81 | if (is_filename) | 81 | if (is_filename) |
82 | { | 82 | { |
83 | char *value_fn; | ||
84 | char *fn; | ||
85 | |||
83 | GNUNET_assert (GNUNET_OK == | 86 | GNUNET_assert (GNUNET_OK == |
84 | GNUNET_CONFIGURATION_get_value_filename (cfg, | 87 | GNUNET_CONFIGURATION_get_value_filename (cfg, |
85 | section, | 88 | section, |
86 | option, | 89 | option, |
87 | &value_fn)); | 90 | &value_fn)); |
91 | fn = GNUNET_STRINGS_filename_expand (value_fn); | ||
92 | if (NULL == fn) | ||
93 | fn = value_fn; | ||
94 | else | ||
95 | GNUNET_free (value_fn); | ||
88 | fprintf (stdout, | 96 | fprintf (stdout, |
89 | "%s = %s\n", | 97 | "%s = %s\n", |
90 | option, | 98 | option, |
91 | GNUNET_STRINGS_filename_expand (value_fn)); | 99 | fn); |
100 | GNUNET_free (fn); | ||
92 | } | 101 | } |
93 | else | 102 | else |
94 | { | 103 | { |
95 | fprintf (stdout, | 104 | fprintf (stdout, |
96 | "%s = %s\n", | 105 | "%s = %s\n", |
97 | option, | 106 | option, |
98 | value); | 107 | value); |
99 | } | 108 | } |
100 | } | 109 | } |
101 | 110 | ||