}
}
+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));
+ exit(1);
+ }
+}
+
void Conf_deinit()
{
config_destroy(&configuration);
else
chdesc->description = config_setting_get_string(setting);
+ ret = snprintf(configstr, maxconfig, "channels.[%d].password", index);
+ setting = config_lookup(&configuration, configstr);
+ if (ret >= maxconfig || ret < 0 || setting == NULL) /* Optional */
+ chdesc->password = NULL;
+ else
+ chdesc->password = config_setting_get_string(setting);
+
ret = snprintf(configstr, maxconfig, "channels.[%d].noenter", index);
setting = config_lookup(&configuration, configstr);
if (ret >= maxconfig || ret < 0 || setting == NULL) /* Optional */
const char *parent;
const char *name;
const char *description;
+ const char *password;
bool_t noenter;
} conf_channel_t;
void Conf_init(const char *conffile);
void Conf_deinit();
+void Conf_test(const char *conffile);
const char *getStrConf(param_t param);
int getIntConf(param_t param);