MXS-1929: Always store the module name parameter
Services, monitors and filters all use the parameters for object serialization. This means that when the object is created, the module parameter must be in the parameter list.
This commit is contained in:
parent
276ff70506
commit
5485f83e75
@ -122,6 +122,9 @@ FilterDef::FilterDef(std::string name, std::string module, MXS_FILTER_OBJECT* ob
|
||||
config_add_param(&ctx, p->name, p->value);
|
||||
}
|
||||
|
||||
// Store module, used when the filter is serialized
|
||||
config_replace_param(&ctx, CN_MODULE, module.c_str());
|
||||
|
||||
parameters = ctx.parameters;
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,9 @@ MXS_MONITOR* monitor_create(const char *name, const char *module, MXS_CONFIG_PAR
|
||||
monitor_add_user(mon, config_get_string(params, CN_USER),
|
||||
config_get_string(params, CN_PASSWORD));
|
||||
|
||||
// Store module, used when the monitor is serialized
|
||||
monitor_set_parameter(mon, CN_MODULE, module);
|
||||
|
||||
monitor_add_parameters(mon, params);
|
||||
|
||||
if ((mon->instance = mon->api->createInstance(mon)) == NULL)
|
||||
|
@ -107,6 +107,9 @@ Service* service_alloc(const char *name, const char *router, MXS_CONFIG_PARAMETE
|
||||
dcb_enable_session_timeouts();
|
||||
}
|
||||
|
||||
// Store router, used when service is serialized
|
||||
service_add_parameter(service, CN_ROUTER, router);
|
||||
|
||||
// Store parameters in the service
|
||||
service_add_parameters(service, params);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user