MXS-2246 Remove duplicate info in SERVICE and Service
Both of them contained fields for the service and router names. Now the names are in SERVICE and they must be accessed via member function.
This commit is contained in:
@ -94,17 +94,17 @@ Avro* Avro::create(SERVICE* service, SRowEventHandler handler)
|
||||
|
||||
if (source)
|
||||
{
|
||||
if (strcmp(source->routerModule, "binlogrouter") == 0)
|
||||
if (strcmp(source->router_name(), "binlogrouter") == 0)
|
||||
{
|
||||
MXS_INFO("Using configuration options from service '%s'.", source->name);
|
||||
MXS_INFO("Using configuration options from service '%s'.", source->name());
|
||||
source_service = source;
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_ERROR("Service '%s' uses router module '%s' instead of "
|
||||
"'binlogrouter'.",
|
||||
source->name,
|
||||
source->routerModule);
|
||||
source->name(),
|
||||
source->router_name());
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ int AvroSession::routeQuery(GWBUF* queue)
|
||||
|
||||
state = AVRO_CLIENT_REGISTERED;
|
||||
MXS_INFO("%s: Client [%s] has completed REGISTRATION action",
|
||||
dcb->service->name,
|
||||
dcb->service->name(),
|
||||
dcb->remote != NULL ? dcb->remote : "");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -213,7 +213,7 @@ bool avro_load_conversion_state(Avro* router)
|
||||
return true;
|
||||
}
|
||||
|
||||
MXS_NOTICE("[%s] Loading stored conversion state: %s", router->service->name, filename);
|
||||
MXS_NOTICE("[%s] Loading stored conversion state: %s", router->service->name(), filename);
|
||||
|
||||
int rc = ini_parse(filename, conv_state_handler, router);
|
||||
|
||||
|
||||
@ -358,13 +358,13 @@ bool avro_handle_convert(const MODULECMD_ARG* args, json_t** output)
|
||||
if (strcmp(args->argv[1].value.string, "start") == 0
|
||||
&& conversion_task_ctl((Avro*)args->argv[0].value.service->router_instance, true))
|
||||
{
|
||||
MXS_NOTICE("Started conversion for service '%s'.", args->argv[0].value.service->name);
|
||||
MXS_NOTICE("Started conversion for service '%s'.", args->argv[0].value.service->name());
|
||||
rval = true;
|
||||
}
|
||||
else if (strcmp(args->argv[1].value.string, "stop") == 0
|
||||
&& conversion_task_ctl((Avro*)args->argv[0].value.service->router_instance, false))
|
||||
{
|
||||
MXS_NOTICE("Stopped conversion for service '%s'.", args->argv[0].value.service->name);
|
||||
MXS_NOTICE("Stopped conversion for service '%s'.", args->argv[0].value.service->name());
|
||||
rval = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user