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

@ -105,7 +105,7 @@ typedef struct server_ref_t
} SERVER_REF;
/** Macro to check whether a SERVER_REF is active */
#define SERVER_REF_IS_ACTIVE(ref) (ref->active)
#define SERVER_REF_IS_ACTIVE(ref) (ref->active && SERVER_IS_ACTIVE(ref->server))
#define SERVICE_MAX_RETRY_INTERVAL 3600 /*< The maximum interval between service start retries */