MXS-3879: Fix loading of persisted global options
The code is now identical to the one in 2.5 and it still suffers from the problem described in MXS-3885. This will be fixed in a separate commit. This commit changes the persisted filename but since it was ignored, it won't affect old installations.
This commit is contained in:
@ -1232,7 +1232,11 @@ 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 (!config_load_single_file(fpath, current_dcontext, current_ccontext))
|
if (strcmp(filename, "maxscale.cnf") == 0 && !config_load_global(fpath))
|
||||||
|
{
|
||||||
|
rval = -1;
|
||||||
|
}
|
||||||
|
else if (!config_load_single_file(fpath, current_dcontext, current_ccontext))
|
||||||
{
|
{
|
||||||
rval = -1;
|
rval = -1;
|
||||||
}
|
}
|
||||||
@ -4749,7 +4753,7 @@ static bool create_global_config(const char* filename)
|
|||||||
|
|
||||||
bool config_global_serialize()
|
bool config_global_serialize()
|
||||||
{
|
{
|
||||||
static const char* GLOBAL_CONFIG_NAME = "global-options";
|
static const char* GLOBAL_CONFIG_NAME = "maxscale";
|
||||||
bool rval = false;
|
bool rval = false;
|
||||||
char filename[PATH_MAX];
|
char filename[PATH_MAX];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user