MINOR: sample: add private argument to the struct sample_fetch
The add of this private argument is to prepare the integration
of the lua fetchs.
diff --git a/src/payload.c b/src/payload.c
index bc3dedd..2654170 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -30,7 +30,7 @@
*/
static int
smp_fetch_wait_end(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw)
+ const struct arg *args, struct sample *smp, const char *kw, void *private)
{
if (!(opt & SMP_OPT_FINAL)) {
smp->flags |= SMP_F_MAY_CHANGE;
@@ -44,7 +44,7 @@
/* return the number of bytes in the request buffer */
static int
smp_fetch_len(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw)
+ const struct arg *args, struct sample *smp, const char *kw, void *private)
{
struct channel *chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? s->rep : s->req;
@@ -60,7 +60,7 @@
/* returns the type of SSL hello message (mainly used to detect an SSL hello) */
static int
smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw)
+ const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int hs_len;
int hs_type, bleft;
@@ -132,7 +132,7 @@
*/
static int
smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw)
+ const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int version, bleft, msg_len;
const unsigned char *data;
@@ -268,7 +268,7 @@
*/
static int
smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw)
+ const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int hs_len, ext_len, bleft;
struct channel *chn;
@@ -501,7 +501,7 @@
*/
int
smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw)
+ const struct arg *args, struct sample *smp, const char *kw, void *private)
{
return fetch_rdp_cookie_name(s, smp, args ? args->data.str.str : NULL, args ? args->data.str.len : 0);
}
@@ -509,11 +509,11 @@
/* returns either 1 or 0 depending on whether an RDP cookie is found or not */
static int
smp_fetch_rdp_cookie_cnt(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *args, struct sample *smp, const char *kw)
+ const struct arg *args, struct sample *smp, const char *kw, void *private)
{
int ret;
- ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp, kw);
+ ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp, kw, private);
if (smp->flags & SMP_F_MAY_CHANGE)
return 0;
@@ -527,7 +527,7 @@
/* extracts part of a payload with offset and length at a given position */
static int
smp_fetch_payload_lv(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *arg_p, struct sample *smp, const char *kw)
+ const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
{
unsigned int len_offset = arg_p[0].data.uint;
unsigned int len_size = arg_p[1].data.uint;
@@ -585,7 +585,7 @@
/* extracts some payload at a fixed position and length */
static int
smp_fetch_payload(struct proxy *px, struct session *s, void *l7, unsigned int opt,
- const struct arg *arg_p, struct sample *smp, const char *kw)
+ const struct arg *arg_p, struct sample *smp, const char *kw, void *private)
{
unsigned int buf_offset = arg_p[0].data.uint;
unsigned int buf_size = arg_p[1].data.uint;