Fix duplication of the router parameter

The service parameter list had two router entries in it due to the
assumption that the parameter list never contained the router itself in
it.
This commit is contained in:
Markus Mäkelä 2019-03-29 07:22:11 +02:00
parent 4f8d6d1853
commit 48791c3877
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -106,12 +106,12 @@ 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);
// Store router, used when service is serialized
service_replace_parameter(service, CN_ROUTER, router);
service->router_instance = router_api->createInstance(service, params);
if (service->router_instance == NULL)