MAJOR: acl: make use of the new sample struct and get rid of acl_test
This change is invasive in lines of code but not much in terms of
functionalities as it's mainly a replacement of struct acl_test
with struct sample.
diff --git a/src/frontend.c b/src/frontend.c
index 00a461e..2e91992 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -500,9 +500,9 @@
/* 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 acl_test *test) {
-
- test->flags = ACL_TEST_F_READ_ONLY;
+ struct acl_expr *expr, struct sample *smp)
+{
+ smp->flags = SMP_F_READ_ONLY;
temp_pattern.data.uint = l4->fe->uuid;
return 1;
}
@@ -513,9 +513,9 @@
*/
static int
acl_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+ struct acl_expr *expr, struct sample *smp)
{
- test->flags = ACL_TEST_F_VOL_TEST;
+ smp->flags = SMP_F_VOL_TEST;
temp_pattern.data.uint = read_freq_ctr(&expr->args->data.prx->fe_sess_per_sec);
return 1;
}
@@ -526,9 +526,9 @@
*/
static int
acl_fetch_fe_conn(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+ struct acl_expr *expr, struct sample *smp)
{
- test->flags = ACL_TEST_F_VOL_TEST;
+ smp->flags = SMP_F_VOL_TEST;
temp_pattern.data.uint = expr->args->data.prx->feconn;
return 1;
}