mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-06 15:41:36 +01:00
MINOR: sample: provide the original sample_conv descriptor struct to the argument checker function.
Note that this argument checker is still unused but will be used by maps.
This commit is contained in:
parent
e6b11e47c5
commit
9c1d67ecbd
@ -243,6 +243,7 @@ struct sample_conv {
|
||||
struct sample *smp); /* process function */
|
||||
unsigned int arg_mask; /* arguments (ARG*()) */
|
||||
int (*val_args)(struct arg *arg_p,
|
||||
struct sample_conv *smp_conv,
|
||||
char **err_msg); /* argument validation function */
|
||||
unsigned int in_type; /* expected input sample type */
|
||||
unsigned int out_type; /* output sample type */
|
||||
|
||||
@ -1277,7 +1277,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
|
||||
if (!conv_expr->arg_p)
|
||||
conv_expr->arg_p = empty_arg_list;
|
||||
|
||||
if (conv->val_args && !conv->val_args(conv_expr->arg_p, &err_msg)) {
|
||||
if (conv->val_args && !conv->val_args(conv_expr->arg_p, conv, &err_msg)) {
|
||||
memprintf(err, "ACL keyword '%s' : invalid args in conv method '%s' : %s.",
|
||||
expr->kw, ckw, err_msg);
|
||||
free(err_msg);
|
||||
|
||||
@ -745,7 +745,7 @@ struct sample_expr *sample_parse_expr(char **str, int *idx, char *err, int err_s
|
||||
if (!conv_expr->arg_p)
|
||||
conv_expr->arg_p = empty_arg_list;
|
||||
|
||||
if (conv->val_args && !conv->val_args(conv_expr->arg_p, &err_msg)) {
|
||||
if (conv->val_args && !conv->val_args(conv_expr->arg_p, conv, &err_msg)) {
|
||||
snprintf(err, err_size, "invalid args in conv method '%s' : %s.", ckw, err_msg);
|
||||
free(err_msg);
|
||||
goto out_error;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user