MINOR: lua: Add flags on the lua TXN to know the execution context
A lua TXN can be created when a sample fetch, an action or a filter callback
function is executed. A flag is now used to track the execute context.
Respectively, HLUA_TXN_SMP_CTX, HLUA_TXN_ACT_CTX and HLUA_TXN_FLT_CTX. The
filter flag is not used for now.
diff --git a/src/hlua.c b/src/hlua.c
index f2ed684..7f0aa9b 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -6936,7 +6936,7 @@
struct hlua_function *fcn = private;
struct stream *stream = smp->strm;
const char *error;
- unsigned int hflags = HLUA_TXN_NOTERM;
+ unsigned int hflags = HLUA_TXN_NOTERM | HLUA_TXN_SMP_CTX;
if (!stream)
return 0;
@@ -7254,7 +7254,7 @@
struct session *sess, struct stream *s, int flags)
{
char **arg;
- unsigned int hflags = 0;
+ unsigned int hflags = HLUA_TXN_ACT_CTX;
int dir, act_ret = ACT_RET_CONT;
const char *error;