diff --git a/include/types/sample.h b/include/types/sample.h index 07b12f3d9..117b06019 100644 --- a/include/types/sample.h +++ b/include/types/sample.h @@ -252,6 +252,7 @@ struct sample { struct proxy *px; struct session *sess; struct stream *strm; + unsigned int opt; /* fetch options (SMP_OPT_*) */ }; /* Used to store sample constant */ diff --git a/src/hlua.c b/src/hlua.c index d45cac985..262163035 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -2773,6 +2773,7 @@ __LJMP static int hlua_run_sample_fetch(lua_State *L) smp.px = hsmp->p; smp.sess = hsmp->s->sess; smp.strm = hsmp->s; + smp.opt = 0; if (!f->process(0, args, &smp, f->kw, f->private)) { if (hsmp->stringsafe) lua_pushstring(L, ""); @@ -2894,6 +2895,7 @@ __LJMP static int hlua_run_sample_conv(lua_State *L) smp.px = hsmp->p; smp.sess = hsmp->s->sess; smp.strm = hsmp->s; + smp.opt = 0; if (!conv->process(args, &smp, conv->private)) { if (hsmp->stringsafe) lua_pushstring(L, ""); diff --git a/src/sample.c b/src/sample.c index 8cc2234cc..353d6bbc2 100644 --- a/src/sample.c +++ b/src/sample.c @@ -1036,6 +1036,7 @@ struct sample *sample_process(struct proxy *px, struct session *sess, p->px = px; p->sess = sess; p->strm = strm; + p->opt = opt; if (!expr->fetch->process(opt, expr->arg_p, p, expr->fetch->kw, expr->fetch->private)) return NULL;