degesch: fix server loading

This commit is contained in:
Přemysl Eric Janouch 2015-07-14 07:49:28 +02:00
parent 855a9d81ba
commit 0c5591fed2
1 changed files with 4 additions and 1 deletions

View File

@ -8985,10 +8985,13 @@ load_servers (struct app_context *ctx)
while ((subtree = str_map_iter_next (&iter)))
{
const char *name = iter.link->key;
const char *err;
if (subtree->type != CONFIG_ITEM_OBJECT)
log_global_error (ctx, "Error in configuration: "
"ignoring server `#s' as it's not an object", name);
else if (check_server_name_for_addition (ctx, name))
else if ((err = check_server_name_for_addition (ctx, name)))
log_global_error (ctx, "Cannot load server `#s': #s", name, err);
else
server_add (ctx, name, subtree);
}
}