X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fgnunet-config.c;h=e1aa94a5c774f4ab5edb57f88c4cb0283c608ffe;hb=72c8645af31896829b674b575c5375706f362a30;hp=c91153f69914e1bd476dcaeb8327f8c7dd4bfdc5;hpb=a299afa8af5593c2114ca8242099d8f7971c428e;p=oweals%2Fgnunet.git diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index c91153f69..e1aa94a5c 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c @@ -106,8 +106,8 @@ run (void *cls, char *const *args, const char *cfgfile, if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, section, option, &value)) { - fprintf (stderr, _("No value for option `%s' in section `%s'\n"), - option, section); + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + section, option); ret = 3; return; } @@ -117,8 +117,8 @@ run (void *cls, char *const *args, const char *cfgfile, if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &value)) { - fprintf (stderr, _("No value for option `%s' in section `%s'\n"), - option, section); + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + section, option); ret = 3; return; } @@ -170,14 +170,15 @@ main (int argc, char *const *argv) 1, &GNUNET_GETOPT_set_string, &value }, GNUNET_GETOPT_OPTION_END }; - if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) return 2; - return (GNUNET_OK == - GNUNET_PROGRAM_run (argc, argv, "gnunet-config [OPTIONS]", - gettext_noop ("Manipulate GNUnet configuration files"), - options, &run, NULL)) ? 0 : ret; + ret = (GNUNET_OK == + GNUNET_PROGRAM_run (argc, argv, "gnunet-config [OPTIONS]", + gettext_noop ("Manipulate GNUnet configuration files"), + options, &run, NULL)) ? 0 : ret; + GNUNET_free ((void*) argv); + return ret; } /* end of gnunet-config.c */