MXS-2304 Use configuration class methods instead of separate implementations

Replaces parameter add/set/remove/free.
This commit is contained in:
Esa Korhonen
2019-02-05 18:06:30 +02:00
parent ed80680da9
commit 35ab911d5c
12 changed files with 44 additions and 204 deletions

View File

@ -62,18 +62,9 @@ using namespace maxscale;
void Avro::read_source_service_options(SERVICE* source)
{
MXS_CONFIG_PARAMETER* params = source->svc_config_param;
for (MXS_CONFIG_PARAMETER* p = params; p; p = p->next)
{
if (strcmp(p->name, "binlogdir") == 0)
{
binlogdir = p->value;
}
else if (strcmp(p->name, "filestem") == 0)
{
filestem = p->value;
}
}
binlogdir = params->get_string("binlogdir");
filestem = params->get_string("filestem");
mxb_assert(!binlogdir.empty() && !filestem.empty());
for (const auto& opt : mxs::strtok(params->get_string("router_options"), ", \t"))
{

View File

@ -133,7 +133,7 @@ int main(int argc, char** argv)
return 1;
}
config_parameter_free(ctx.parameters);
MXS_CONFIG_PARAMETER::free_all(&ctx.parameters);
// Declared in config.cc and needs to be removed if/when blr is refactored
extern const MXS_MODULE_PARAM config_server_params[];