- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Malformed configuration, exit ...\n"));
- ret = GNUNET_SYSERR;
- GNUNET_free (allopts);
- GNUNET_free (lpfx);
- goto cleanup;
+ if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, cfg_fn))
+ {
+ GNUNET_log (
+ GNUNET_ERROR_TYPE_ERROR,
+ _ (
+ "Unreadable or malformed default configuration file `%s', exit ...\n"),
+ cfg_fn);
+ ret = GNUNET_SYSERR;
+ GNUNET_free (allopts);
+ GNUNET_free (lpfx);
+ goto cleanup;
+ }
+ }
+ else
+ {
+ GNUNET_free (cfg_fn);
+ cfg_fn = NULL;
+ if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, NULL))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _ ("Unreadable or malformed configuration, exit ...\n"));
+ ret = GNUNET_SYSERR;
+ GNUNET_free (allopts);
+ GNUNET_free (lpfx);
+ goto cleanup;
+ }