Abstract server active checks

The checks for the server active status are now hidden behind a
macro. This allows for the conditions of the activity to change without
having to alter the code that uses it.
This commit is contained in:
Markus Makela
2016-11-11 11:05:13 +02:00
parent ae7981f147
commit 2fcfc102be
4 changed files with 55 additions and 58 deletions

View File

@ -1365,7 +1365,7 @@ void dprintService(DCB *dcb, SERVICE *service)
dcb_printf(dcb, "\tBackend databases:\n");
while (server)
{
if (server->active && server->server->is_active)
if (SERVER_REF_IS_ACTIVE(server))
{
dcb_printf(dcb, "\t\t%s:%d Protocol: %s\n", server->server->name,
server->server->port, server->server->protocol);