- conf = defaultconfig;
- else
- conf = conffile;
- if (config_read_file(&configuration, conf) != CONFIG_TRUE) {
- fprintf(stderr, "Error in config file %s: %s at line %d\n", conffile,
- config_error_text(&configuration), config_error_line(&configuration));
+ conffile = defaultconfig;
+ if (config_read_file(&configuration, conffile) != CONFIG_TRUE) {
+ Log_fatal("Error in config file %s line %d: %s", conffile,
+ config_error_line(&configuration), config_error_text(&configuration));
+ }
+}
+
+void Conf_test(const char *conffile)
+{
+ config_init(&configuration);
+ if (conffile == NULL)
+ conffile = defaultconfig;
+ if (config_read_file(&configuration, conffile) != CONFIG_TRUE) {
+ fprintf(stderr, "Error in config file %s line %d: %s", conffile,
+ config_error_line(&configuration), config_error_text(&configuration));