aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_expression.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-28 23:04:59 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-28 23:04:59 +0000
commitdac3916ef0de04c3081bc8fef736fe1a84352eba (patch)
tree11d0f2d1e699b55920685492b8383bebb5de3260 /src/lua/lua_expression.c
parentb303477f7addbc15365aeae4d0cdeadf60fa21b1 (diff)
downloadrspamd-dac3916ef0de04c3081bc8fef736fe1a84352eba.tar.gz
rspamd-dac3916ef0de04c3081bc8fef736fe1a84352eba.zip
Use expressions process flags.
Diffstat (limited to 'src/lua/lua_expression.c')
-rw-r--r--src/lua/lua_expression.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lua/lua_expression.c b/src/lua/lua_expression.c
index b7e47c76a..2d7ceb734 100644
--- a/src/lua/lua_expression.c
+++ b/src/lua/lua_expression.c
@@ -174,8 +174,13 @@ lua_expr_process (lua_State *L)
{
struct lua_expression *e = rspamd_lua_expression (L, 1);
gint res;
+ gint flags = 0;
- res = rspamd_process_expression (e->expr, GINT_TO_POINTER (2));
+ if (lua_gettop (L) >= 3) {
+ flags = lua_tonumber (L, 3);
+ }
+
+ res = rspamd_process_expression (e->expr, flags, GINT_TO_POINTER (2));
lua_pushnumber (L, res);