]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: sample: accept fetch keywords without parenthesis
authorWilly Tarreau <w@1wt.eu>
Fri, 19 Oct 2012 14:47:23 +0000 (16:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Oct 2012 14:47:23 +0000 (16:47 +0200)
fetch keywords which support arguments do not support being called
without parenthesis even if all arguments are optional. Let's fix
this to allow fetch keywords without parenthesis as is already done
in ACLs.

src/sample.c

index 3703a44b46cc8285d6724665977738fda9db3384..3e0c96501a8847674adaefe59677d2ebbe44ac1c 100644 (file)
@@ -354,7 +354,7 @@ struct sample_expr *sample_parse_expr(char **str, int *idx, char *err, int err_s
                        goto out_error;
                }
        }
-       else if (fetch->arg_mask) {
+       else if (ARGM(fetch->arg_mask)) {
                p = my_strndup(str[*idx], endw - str[*idx]);
                if (p) {
                        snprintf(err, err_size, "missing args for fetch method '%s'.", p);