Cleanup server.h

- All (but the printing/debug functions) are now in snake_case.
- Functions made const correct.
- All function prototypes now have named arguments.

Documentation still to be moved, and file possibly split into
include/mascale/server.h and server/core/maxscale/server.h
This commit is contained in:
Johan Wikman
2017-01-09 11:19:09 +02:00
parent 1b8742781b
commit c3ddc3ac22
7 changed files with 52 additions and 77 deletions

View File

@ -2100,7 +2100,7 @@ static void service_calculate_weights(SERVICE *service)
for (SERVER_REF *server = service->dbref; server; server = server->next)
{
server->weight = SERVICE_BASE_SERVER_WEIGHT;
char *param = serverGetParameter(server->server, weightby);
const char *param = server_get_parameter(server->server, weightby);
if (param)
{
total += atoi(param);
@ -2124,7 +2124,7 @@ static void service_calculate_weights(SERVICE *service)
/** Calculate the relative weight of the servers */
for (SERVER_REF *server = service->dbref; server; server = server->next)
{
char *param = serverGetParameter(server->server, weightby);
const char *param = server_get_parameter(server->server, weightby);
if (param)
{
int wght = atoi(param);