MEDIUM: acl: replace acl_expr with args in acl fetch_* functions
Having the args everywhere will make it easier to share fetch functions
between patterns and ACLs. The only place where we could have needed
the expr was in the http_prefetch function which can do well without.
diff --git a/src/frontend.c b/src/frontend.c
index c44cd92..8cd9de7 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -500,7 +500,7 @@
/* set temp integer to the id of the frontend */
static int
acl_fetch_fe_id(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct sample *smp)
+ const struct arg *args, struct sample *smp)
{
smp->flags = SMP_F_VOL_SESS;
smp->type = SMP_T_UINT;
@@ -514,11 +514,11 @@
*/
static int
acl_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct sample *smp)
+ const struct arg *args, struct sample *smp)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
- smp->data.uint = read_freq_ctr(&expr->args->data.prx->fe_sess_per_sec);
+ smp->data.uint = read_freq_ctr(&args->data.prx->fe_sess_per_sec);
return 1;
}
@@ -528,11 +528,11 @@
*/
static int
acl_fetch_fe_conn(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct sample *smp)
+ const struct arg *args, struct sample *smp)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
- smp->data.uint = expr->args->data.prx->feconn;
+ smp->data.uint = args->data.prx->feconn;
return 1;
}