From: Christopher Faulet Date: Wed, 26 Oct 2016 09:06:28 +0000 (+0200) Subject: CLEANUP: remove last references to 'ruleset' section X-Git-Tag: v1.7-dev6~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=898566e7e65b73b19806ddaf92a941ef24b785ee;p=thirdparty%2Fhaproxy.git CLEANUP: remove last references to 'ruleset' section --- diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h index 6dc6ad586c..39e8a4c5b2 100644 --- a/include/common/cfgparse.h +++ b/include/common/cfgparse.h @@ -91,7 +91,6 @@ static inline int warnifnotcap(struct proxy *proxy, int cap, const char *file, i switch (cap) { case PR_CAP_BE: msg = "no backend"; break; case PR_CAP_FE: msg = "no frontend"; break; - case PR_CAP_RS: msg = "no ruleset"; break; case PR_CAP_BE|PR_CAP_FE: msg = "neither frontend nor backend"; break; default: msg = "not enough"; break; } diff --git a/include/types/proxy.h b/include/types/proxy.h index 028b3a731f..80d6a6448b 100644 --- a/include/types/proxy.h +++ b/include/types/proxy.h @@ -77,8 +77,7 @@ enum PR_SRV_STATE_FILE { #define PR_CAP_NONE 0x0000 #define PR_CAP_FE 0x0001 #define PR_CAP_BE 0x0002 -#define PR_CAP_RS 0x0004 -#define PR_CAP_LISTEN (PR_CAP_FE|PR_CAP_BE|PR_CAP_RS) +#define PR_CAP_LISTEN (PR_CAP_FE|PR_CAP_BE) /* bits for proxy->options */ #define PR_O_REDISP 0x00000001 /* allow reconnection to dispatch in case of errors */ diff --git a/src/cfgparse.c b/src/cfgparse.c index 356ae98107..83accbeb9b 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2040,7 +2040,7 @@ static int create_cond_regex_rule(const char *file, int line, goto err; } - if (warnifnotcap(px, PR_CAP_RS, file, line, cmd, NULL)) + if (warnifnotcap(px, PR_CAP_FE | PR_CAP_BE, file, line, cmd, NULL)) ret_code |= ERR_WARN; if (cond_start && @@ -2743,9 +2743,9 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) if (!strcmp(args[0], "listen")) rc = PR_CAP_LISTEN; else if (!strcmp(args[0], "frontend")) - rc = PR_CAP_FE | PR_CAP_RS; + rc = PR_CAP_FE; else if (!strcmp(args[0], "backend")) - rc = PR_CAP_BE | PR_CAP_RS; + rc = PR_CAP_BE; else rc = PR_CAP_NONE; @@ -6502,7 +6502,7 @@ stats_error_parsing: err_code |= ERR_ALERT | ERR_FATAL; goto out; } - else if (warnifnotcap(curproxy, PR_CAP_RS, file, linenum, args[0], NULL)) + else if (warnifnotcap(curproxy, PR_CAP_FE | PR_CAP_BE, file, linenum, args[0], NULL)) err_code |= ERR_WARN; if (*(args[1]) == 0) { @@ -6599,7 +6599,7 @@ stats_error_parsing: err_code |= ERR_ALERT | ERR_FATAL; goto out; } - else if (warnifnotcap(curproxy, PR_CAP_RS, file, linenum, args[0], NULL)) + else if (warnifnotcap(curproxy, PR_CAP_FE | PR_CAP_BE, file, linenum, args[0], NULL)) err_code |= ERR_WARN; if (*(args[1]) == 0) { diff --git a/src/proxy.c b/src/proxy.c index 1955d823d6..8a6004e8dd 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -56,7 +56,7 @@ unsigned int error_snapshot_id = 0; /* global ID assigned to each error then /* * This function returns a string containing a name describing capabilities to * report comprehensible error messages. Specifically, it will return the words - * "frontend", "backend", "ruleset" when appropriate, or "proxy" for all other + * "frontend", "backend" when appropriate, or "proxy" for all other * cases including the proxies declared in "listen" mode. */ const char *proxy_cap_str(int cap) @@ -66,8 +66,6 @@ const char *proxy_cap_str(int cap) return "frontend"; else if (cap & PR_CAP_BE) return "backend"; - else if (cap & PR_CAP_RS) - return "ruleset"; } return "proxy"; }