Serialize server weighting parameters
The server weighting parameters couldn't be altered online and they weren't serialized to disk. Only servers that are created online will have their weighting parameters persisted to disk.
This commit is contained in:
@ -286,7 +286,20 @@ bool runtime_alter_server(SERVER *server, char *key, char *value)
|
||||
}
|
||||
else
|
||||
{
|
||||
valid = false;
|
||||
if (!serverRemoveParameter(server, key) && !value[0])
|
||||
{
|
||||
valid = false;
|
||||
}
|
||||
else if (value[0])
|
||||
{
|
||||
serverAddParameter(server, key, value);
|
||||
|
||||
/**
|
||||
* It's likely that this parameter is used as a weighting parameter.
|
||||
* We need to update the weights of services that use this.
|
||||
*/
|
||||
service_update_weights();
|
||||
}
|
||||
}
|
||||
|
||||
if (valid)
|
||||
|
Reference in New Issue
Block a user