MXS-2304 Convert static config parameter methods to non-static

Parameter handling changed in several places.
This commit is contained in:
Esa Korhonen
2019-02-18 18:31:59 +02:00
parent b64e9b3ee0
commit 5828c93112
16 changed files with 138 additions and 153 deletions

View File

@ -320,10 +320,10 @@ int test(FilterModule& filter_module, const TEST_CASE& tc)
int rv = 1;
auto params = filter_module.create_default_parameters();
MXS_CONFIG_PARAMETER::set(&params, "cache_in_transactions", to_string(tc.cit));
MXS_CONFIG_PARAMETER::set(&params, "debug", "31");
MXS_CONFIG_PARAMETER::set(&params, "cached_data", "shared");
MXS_CONFIG_PARAMETER::set(&params, "selects", "verify_cacheable");
params->set("cache_in_transactions", to_string(tc.cit));
params->set("debug", "31");
params->set("cached_data", "shared");
params->set("selects", "verify_cacheable");
auto_ptr<FilterModule::Instance> sInstance = filter_module.createInstance("test", params);

View File

@ -817,8 +817,8 @@ int test(FilterModule& filter_module, const FW_TEST& t)
file.write(t.zRules);
auto params = filter_module.create_default_parameters();
MXS_CONFIG_PARAMETER::set(&params, "action", zAction);
MXS_CONFIG_PARAMETER::set(&params, "rules", file.name());
params->set("action", zAction);
params->set("rules", file.name());
auto_ptr<FilterModule::Instance> sInstance = filter_module.createInstance("test", params);

View File

@ -23,13 +23,13 @@ namespace maxscale
MXS_CONFIG_PARAMETER* Module::create_default_parameters() const
{
MXS_CONFIG_PARAMETER* rval = nullptr;
MXS_CONFIG_PARAMETER* rval = new MXS_CONFIG_PARAMETER;
const MXS_MODULE_PARAM* param_definition = m_module.parameters;
while (param_definition->name)
{
if (param_definition->default_value)
{
MXS_CONFIG_PARAMETER::set(&rval, param_definition->name, param_definition->default_value);
rval->set(param_definition->name, param_definition->default_value);
}
++param_definition;
}