number,
dummy))
return GNUNET_SYSERR;
- return GNUNET_OK;
+ return GNUNET_OK;
}
{
struct ConfigEntry *e;
char dummy[2];
-
+
if (NULL == (e = find_entry (cfg, section, option)))
return GNUNET_SYSERR;
if (NULL == e->val)
const char *defaults_d)
{
if (GNUNET_SYSERR ==
- GNUNET_DISK_directory_scan (defaults_d, &parse_configuration_file, cfg))
+ GNUNET_DISK_directory_scan (defaults_d,
+ &parse_configuration_file,
+ cfg))
return GNUNET_SYSERR; /* no configuration at all found */
return GNUNET_OK;
}
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
{
char *value_fn;
char *fn;
-
+
GNUNET_assert (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_filename (cfg,
section,
if (! list_sections)
{
fprintf (stderr,
- _("--section argument is required\n"));
+ _("%s or %s argument is required\n"),
+ "--section",
+ "--list-sections");
+ ret = 1;
+ }
+ else
+ {
+ fprintf (stderr,
+ _("The following sections are available:\n"));
+ GNUNET_CONFIGURATION_iterate_sections (cfg,
+ &print_section_name,
+ NULL);
}
- fprintf (stderr,
- _("The following sections are available:\n"));
- GNUNET_CONFIGURATION_iterate_sections (cfg,
- &print_section_name,
- NULL);
- ret = 1;
goto cleanup;
}
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPROSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
{
if (0 != strcmp (cc.cfgfile,
cfg_fn))
+ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Could not access configuration file `%s'\n"),
cc.cfgfile);
- if (GNUNET_SYSERR ==
- GNUNET_CONFIGURATION_load (cfg,
- NULL))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Malformed configuration, exit ...\n"));
ret = GNUNET_SYSERR;
GNUNET_free (allopts);
GNUNET_free (lpfx);
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
int flags;
char dummy[2];
#endif
-
+
if (GNUNET_CONFIGURATION_have_value
(sh->cfg,
sh->service_name,
}
if (0 != strcmp (opt_cfg_filename,
cfg_filename))
+ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Could not access configuration file `%s'\n"),
opt_cfg_filename);
+ goto shutdown;
+ }
}
if (GNUNET_OK != setup_service (&sh))
goto shutdown;