aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_classifier.c1
-rw-r--r--src/lua/lua_common.c7
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lua/lua_classifier.c b/src/lua/lua_classifier.c
index 32d4f88ed..0bf0daca8 100644
--- a/src/lua/lua_classifier.c
+++ b/src/lua/lua_classifier.c
@@ -109,7 +109,6 @@ call_classifier_pre_callback (struct classifier_config *ccf, struct worker_task
lua_pop (L, 1);
}
}
- lua_pop (L, 1);
}
return res;
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index 67206b8ef..990be90ef 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -384,12 +384,15 @@ lua_call_expression_func (const gchar *module, const gchar *function,
lua_pop (L, 1);
lua_getglobal (L, function);
}
- else {
+ else if (lua_istable (L, -1)) {
/* Call local function in table */
lua_pushstring (L, function);
lua_gettable (L, -2);
pop += 2;
}
+ else {
+ msg_err ("Bad type: %s for function: %s for module: %s", lua_typename (L, lua_type (L, -1)), function, module);
+ }
}
else {
/* Try to get global variable */
@@ -441,6 +444,8 @@ lua_call_expression_func (const gchar *module, const gchar *function,
return FALSE;
}
*res = lua_toboolean (L, -1);
+ lua_gc (L, LUA_GCCOLLECT, 0);
+ msg_info ("lua eats %d kbytes", lua_gc (L, LUA_GCCOUNT, 0));
lua_pop (L, pop);
return TRUE;