mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-06 13:33:02 +00:00
MINOR: server: introduction of 3 new server flags
Introduction of 3 new server flags to remember if some parameters were set during configuration parsing. * SRV_F_CHECKADDR: this server has a check addr configured * SRV_F_CHECKPORT: this server has a check port configured * SRV_F_AGENTADDR: this server has a agent addr configured
This commit is contained in:
parent
95db2bcfee
commit
6b453f166f
@ -98,6 +98,9 @@ enum srv_admin {
|
||||
#define SRV_F_NON_STICK 0x0004 /* never add connections allocated to this server to a stick table */
|
||||
#define SRV_F_USE_NS_FROM_PP 0x0008 /* use namespace associated with connection if present */
|
||||
#define SRV_F_FORCED_ID 0x0010 /* server's ID was forced in the configuration */
|
||||
#define SRV_F_CHECKADDR 0x0020 /* this server has a check addr configured */
|
||||
#define SRV_F_CHECKPORT 0x0040 /* this server has a check port configured */
|
||||
#define SRV_F_AGENTADDR 0x0080 /* this server has a agent addr configured */
|
||||
|
||||
/* configured server options for send-proxy (server->pp_opts) */
|
||||
#define SRV_PP_V1 0x0001 /* proxy protocol version 1 */
|
||||
|
@ -1002,6 +1002,8 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
||||
|
||||
newsrv->check.use_ssl = curproxy->defsrv.check.use_ssl;
|
||||
newsrv->check.port = curproxy->defsrv.check.port;
|
||||
if (newsrv->check.port)
|
||||
newsrv->flags |= SRV_F_CHECKPORT;
|
||||
newsrv->check.inter = curproxy->defsrv.check.inter;
|
||||
newsrv->check.fastinter = curproxy->defsrv.check.fastinter;
|
||||
newsrv->check.downinter = curproxy->defsrv.check.downinter;
|
||||
@ -1292,10 +1294,13 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
||||
}
|
||||
|
||||
newsrv->check.addr = newsrv->agent.addr = *sk;
|
||||
newsrv->flags |= SRV_F_CHECKADDR;
|
||||
newsrv->flags |= SRV_F_AGENTADDR;
|
||||
cur_arg += 2;
|
||||
}
|
||||
else if (!strcmp(args[cur_arg], "port")) {
|
||||
newsrv->check.port = atol(args[cur_arg + 1]);
|
||||
newsrv->flags |= SRV_F_CHECKPORT;
|
||||
cur_arg += 2;
|
||||
}
|
||||
else if (!defsrv && !strcmp(args[cur_arg], "backup")) {
|
||||
|
Loading…
Reference in New Issue
Block a user