]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: remove last references to 'ruleset' section
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Oct 2016 09:06:28 +0000 (11:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 9 Nov 2016 21:50:54 +0000 (22:50 +0100)
include/common/cfgparse.h
include/types/proxy.h
src/cfgparse.c
src/proxy.c

index 6dc6ad586c0c02924101cfbb2905ed2d381bf422..39e8a4c5b28025508aa21a057adb285a7ede44ae 100644 (file)
@@ -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;
        }
index 028b3a731fa50463f97e3657b40b39d3b05ad211..80d6a6448b7e8a537e239130a07c300bf51736d8 100644 (file)
@@ -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 */
index 356ae98107d69e8e56e32246179fb1f84c82925f..83accbeb9b84c8540508938ea120339d6fb69f27 100644 (file)
@@ -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) {
index 1955d823d6083763acc78637da239b4db689a28d..8a6004e8ddff93c29ea6fa61a6253e1f39dace84 100644 (file)
@@ -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";
 }