diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-10 17:36:11 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-10 17:36:11 +0100 |
commit | b237fcbd7e189f755dd8b372398a0ea94255d090 (patch) | |
tree | cb5c453ea3b4b966bf30784a4200a1d2b32f622a /src/util/service.c | |
parent | 54f722729882247a318fbf686f2b2c31137ab72b (diff) | |
download | gnunet-b237fcbd7e189f755dd8b372398a0ea94255d090.tar.gz gnunet-b237fcbd7e189f755dd8b372398a0ea94255d090.zip |
new convenience function to do operations on a configuration object to avoid repetitive configuration_create, _load and _destroy logic
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/util/service.c b/src/util/service.c index ea34abc6c..b61168570 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -1815,8 +1815,9 @@ GNUNET_SERVICE_run_ (int argc, | |||
1815 | opt_cfg_filename = GNUNET_strdup (cfg_filename); | 1815 | opt_cfg_filename = GNUNET_strdup (cfg_filename); |
1816 | if (GNUNET_YES == GNUNET_DISK_file_test (opt_cfg_filename)) | 1816 | if (GNUNET_YES == GNUNET_DISK_file_test (opt_cfg_filename)) |
1817 | { | 1817 | { |
1818 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, | 1818 | if (GNUNET_SYSERR == |
1819 | opt_cfg_filename)) | 1819 | GNUNET_CONFIGURATION_load (cfg, |
1820 | opt_cfg_filename)) | ||
1820 | { | 1821 | { |
1821 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1822 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1822 | _("Malformed configuration file `%s', exit ...\n"), | 1823 | _("Malformed configuration file `%s', exit ...\n"), |
@@ -1826,8 +1827,9 @@ GNUNET_SERVICE_run_ (int argc, | |||
1826 | } | 1827 | } |
1827 | else | 1828 | else |
1828 | { | 1829 | { |
1829 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, | 1830 | if (GNUNET_SYSERR == |
1830 | NULL)) | 1831 | GNUNET_CONFIGURATION_load (cfg, |
1832 | NULL)) | ||
1831 | { | 1833 | { |
1832 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1834 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1833 | _("Malformed configuration, exit ...\n")); | 1835 | _("Malformed configuration, exit ...\n")); |