]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: sample: add ARGC_OPT
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 28 Dec 2022 10:30:51 +0000 (11:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Jan 2023 14:18:59 +0000 (15:18 +0100)
Add ARGC_OPT enum to provide more context for upcoming sample parse errors
involving proxy "option" config directives.

include/haproxy/arg-t.h
src/sample.c

index 57b4080ca650bfaef06daa8f8af868cc72a9938d..d90d326ef3540fce36c87c75bd15b867b16a0fd5 100644 (file)
@@ -83,6 +83,7 @@ enum {
        ARGC_USRV,     /* use-server message */
        ARGC_HERR,     /* http-error */
        ARGC_OT,       /* opentracing scope args */
+       ARGC_OPT,      /* option directive */
        ARGC_TCO,      /* tcp-request connection expression */
        ARGC_TSE,      /* tcp-request session expression */
        ARGC_TRQ,      /* tcp-request content expression */
index 953e463a4f30eef3fe22f204bc3b2edd3f75f143..2e04c74c9f436ec3badb7f79916b1f359dd174ae 100644 (file)
@@ -1310,6 +1310,7 @@ int smp_resolve_args(struct proxy *p, char **err)
                case ARGC_USRV:  where = "in use-server or balance expression in"; break;
                case ARGC_HERR:  where = "in http-error directive in"; break;
                case ARGC_OT:    where = "in ot-scope directive in"; break;
+               case ARGC_OPT:   where = "in option directive in"; break;
                case ARGC_TCO:   where = "in tcp-request connection expression in"; break;
                case ARGC_TSE:   where = "in tcp-request session expression in"; break;
                case ARGC_TRQ:   where = "in tcp-request content expression in"; break;