MXS-1464 When pre-parsing, only check maxscale section

When pre-parsing the configuration file, the existence of environment
variables is only done for the [maxscale] section. For other sections
a nicer error message is obtained if the comlplaint is made when the
configuration file is actually loaded.

Mechanism for providing custom error message from the pre-parsing
function added.
This commit is contained in:
Johan Wikman
2017-10-09 15:52:24 +03:00
parent 22f4b02b44
commit d1df1837a4
2 changed files with 49 additions and 27 deletions

View File

@ -472,7 +472,7 @@ static int ini_handler(void *userdata, const char *section, const char *name, co
if (!env_value)
{
MXS_ERROR("The environment variable %s, used as value for parameter %s "
"in section %s, does not exist.", value, name, section);
"in section %s, does not exist.", value + 1, name, section);
return 0;
}