MXS-2304 Config string handling cleanup

Using correct functions in most cases.
This commit is contained in:
Esa Korhonen
2019-02-04 12:58:18 +02:00
parent 4132c9bbbc
commit 5a409f313a
18 changed files with 50 additions and 50 deletions

View File

@ -75,7 +75,7 @@ void Avro::read_source_service_options(SERVICE* source)
}
}
for (const auto& opt : mxs::strtok(config_get_string(params, "router_options"), ", \t"))
for (const auto& opt : mxs::strtok(params->get_string("router_options"), ", \t"))
{
auto kv = mxs::strtok(opt, "=");
@ -129,9 +129,9 @@ Avro* Avro::create(SERVICE* service, SRowEventHandler handler)
Avro::Avro(SERVICE* service, MXS_CONFIG_PARAMETER* params, SERVICE* source, SRowEventHandler handler)
: service(service)
, filestem(config_get_string(params, "filestem"))
, binlogdir(config_get_string(params, "binlogdir"))
, avrodir(config_get_string(params, "avrodir"))
, filestem(params->get_string("filestem"))
, binlogdir(params->get_string("binlogdir"))
, avrodir(params->get_string("avrodir"))
, current_pos(4)
, binlog_fd(-1)
, trx_count(0)

View File

@ -63,7 +63,7 @@ MXS_ROUTER* createInstance(SERVICE* service, MXS_CONFIG_PARAMETER* params)
uint64_t block_size = service->svc_config_param->get_size("block_size");
mxs_avro_codec_type codec = static_cast<mxs_avro_codec_type>(
service->svc_config_param->get_enum("codec", codec_values));
std::string avrodir = config_get_string(service->svc_config_param, "avrodir");
std::string avrodir = service->svc_config_param->get_string("avrodir");
SRowEventHandler handler(new AvroConverter(avrodir, block_size, codec));
Avro* router = Avro::create(service, handler);