MXS-2304 Convert static config parameter methods to non-static
Parameter handling changed in several places.
This commit is contained in:
@ -799,16 +799,15 @@ static MXS_ROUTER* createInstance(SERVICE* service, MXS_CONFIG_PARAMETER* params
|
||||
{
|
||||
// Declared in config.cc and needs to be removed if/when blr is refactored
|
||||
extern const MXS_MODULE_PARAM config_server_params[];
|
||||
MXS_CONFIG_PARAMETER* params = nullptr;
|
||||
MXS_CONFIG_PARAMETER::set_from_list(¶ms,
|
||||
{
|
||||
{"address", "_none_"},
|
||||
{"port", "3306"},
|
||||
{"protocol", "mariadbbackend"},
|
||||
{"authenticator", "MySQLBackendAuth"}
|
||||
}, config_server_params);
|
||||
MXS_CONFIG_PARAMETER params;
|
||||
params.set_from_list({
|
||||
{"address", "_none_"},
|
||||
{"port", "3306"},
|
||||
{"protocol", "mariadbbackend"},
|
||||
{"authenticator", "MySQLBackendAuth"}
|
||||
}, config_server_params);
|
||||
|
||||
Server* server = Server::server_alloc("binlog_router_master_host", params);
|
||||
Server* server = Server::server_alloc("binlog_router_master_host", ¶ms);
|
||||
|
||||
if (server == NULL)
|
||||
{
|
||||
|
@ -133,21 +133,20 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
MXS_CONFIG_PARAMETER::free_all(&ctx.parameters);
|
||||
delete ctx.parameters;
|
||||
|
||||
// Declared in config.cc and needs to be removed if/when blr is refactored
|
||||
extern const MXS_MODULE_PARAM config_server_params[];
|
||||
|
||||
MXS_CONFIG_PARAMETER* params = nullptr;
|
||||
MXS_CONFIG_PARAMETER::set_from_list(¶ms,
|
||||
{
|
||||
{"address", "_none_"},
|
||||
{"port", "3306"},
|
||||
{"protocol", "MySQLBackend"},
|
||||
{"authenticator", "MySQLBackendAuth"}
|
||||
}, config_server_params);
|
||||
MXS_CONFIG_PARAMETER params;
|
||||
params.set_from_list({
|
||||
{"address", "_none_"},
|
||||
{"port", "3306"},
|
||||
{"protocol", "MySQLBackend"},
|
||||
{"authenticator", "MySQLBackendAuth"}
|
||||
}, config_server_params);
|
||||
|
||||
Server* server = Server::server_alloc("binlog_router_master_host", params);
|
||||
Server* server = Server::server_alloc("binlog_router_master_host", ¶ms);
|
||||
if (server == NULL)
|
||||
{
|
||||
printf("Failed to allocate 'server' object\n");
|
||||
|
Reference in New Issue
Block a user