update: add name option for pools with same names

This commit is contained in:
ngn
2024-08-18 04:01:17 +03:00
parent 41111ce76d
commit 41318f3b1f
4 changed files with 15 additions and 9 deletions

View File

@ -105,7 +105,12 @@ int config_load_handler(void *data, const char *_section, const char *_key, cons
if (!config_pool_contains(section))
config_pool_add(section);
if (eq(key, "host")) {
if (eq(key, "name")) {
free(config.pools->name);
config.pools->name = strdup(value);
}
else if (eq(key, "host")) {
free(config.pools->host);
config.pools->host = strdup(value);
}