X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fconf.c;h=2ec69a5a570eb7ca93dc95c86daf5ce82ad07f20;hb=36601a5de5f90e16188deadd271b70595b4cc237;hp=447061f46d5c93047791e4ba9b5968d728629ad9;hpb=f4a9bf7bdc936fadb5a5856fd69a85d8b58e7e39;p=umurmur.git diff --git a/src/conf.c b/src/conf.c index 447061f..2ec69a5 100644 --- a/src/conf.c +++ b/src/conf.c @@ -340,6 +340,13 @@ int Conf_getNextChannel(conf_channel_t *chdesc, int index) chdesc->silent = false; else chdesc->silent = config_setting_get_bool(setting); + + ret = snprintf(configstr, maxconfig, "channels.[%d].position", index); + setting = config_lookup(&configuration, configstr); + if (ret >= maxconfig || ret < 0 || setting == NULL) /* Optional */ + chdesc->position = 0; + else + chdesc->position = config_setting_get_int(setting); return 0; }