MEDIUM: sample change the prototype of sample-fetches and converters functions
This patch removes the structs "session", "stream" and "proxy" from
the sample-fetches and converters function prototypes.
This permits to remove some weight in the prototype call.
diff --git a/src/frontend.c b/src/frontend.c
index e8531e9..001b74d 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -159,12 +159,12 @@
/* set temp integer to the id of the frontend */
static int
-smp_fetch_fe_id(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fe_id(unsigned int opt, const struct arg *args, struct sample *smp,
+ const char *kw, void *private)
{
smp->flags = SMP_F_VOL_SESS;
smp->type = SMP_T_UINT;
- smp->data.uint = sess->fe->uuid;
+ smp->data.uint = smp->sess->fe->uuid;
return 1;
}
@@ -173,8 +173,8 @@
* an undefined behaviour.
*/
static int
-smp_fetch_fe_sess_rate(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fe_sess_rate(unsigned int opt, const struct arg *args, struct sample *smp,
+ const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
@@ -187,8 +187,8 @@
* an undefined behaviour.
*/
static int
-smp_fetch_fe_conn(struct proxy *px, struct session *sess, struct stream *strm, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw, void *private)
+smp_fetch_fe_conn(unsigned int opt, const struct arg *args, struct sample *smp,
+ const char *kw, void *private)
{
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;