Fix alteration of new router parameters
If a router parameter has no default value, the previous value would be returned as an empty string. A debug assertion would be triggered when a parameter of this type was altered. When a new router parameter is encountered and the alteration fails, the modified value in the service need to be removed. Previously, the new value would have been stored in the service with an empty value which would have caused problems.
This commit is contained in:
@ -135,6 +135,14 @@ void service_update(SERVICE *service, char *router, char *user, char *auth);
|
||||
*/
|
||||
void service_add_parameters(SERVICE *service, const MXS_CONFIG_PARAMETER *param);
|
||||
|
||||
/**
|
||||
* @brief Remove service parameter
|
||||
*
|
||||
* @param service Service to modify
|
||||
* @param key Parameter to remove
|
||||
*/
|
||||
void service_remove_parameter(SERVICE *service, const char* key);
|
||||
|
||||
/**
|
||||
* @brief Replace service parameter
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user