MXS-3885: Fix loading of configs from directories
The global config handler should only be used for the persisted maxscale.cnf file, not for all files named maxscale.cnf.
This commit is contained in:
@ -1232,9 +1232,12 @@ int config_cb(const char* fpath, const struct stat* sb, int typeflag, struct FTW
|
|||||||
mxb_assert(current_dcontext);
|
mxb_assert(current_dcontext);
|
||||||
mxb_assert(current_ccontext);
|
mxb_assert(current_ccontext);
|
||||||
|
|
||||||
if (strcmp(filename, "maxscale.cnf") == 0 && !config_load_global(fpath))
|
if (is_persisted_config && strcmp(filename, "maxscale.cnf") == 0)
|
||||||
{
|
{
|
||||||
rval = -1;
|
if (!config_load_global(fpath))
|
||||||
|
{
|
||||||
|
rval = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!config_load_single_file(fpath, current_dcontext, current_ccontext))
|
else if (!config_load_single_file(fpath, current_dcontext, current_ccontext))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user