From 5aefad0f52cabf4dacdf85d69a93ff3d9596f6d4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 20 May 2019 16:58:27 +0100 Subject: [PATCH] [Minor] Fix selectors usage --- lualib/lua_maps_expressions.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lualib/lua_maps_expressions.lua b/lualib/lua_maps_expressions.lua index f0b1f176a..61d2e1186 100644 --- a/lualib/lua_maps_expressions.lua +++ b/lualib/lua_maps_expressions.lua @@ -122,7 +122,7 @@ local function create(cfg, obj, module_name) } for name,rule in pairs(obj.rules) do - local sel = lua_selectors.parse_selector(cfg, rule.selector) + local sel = lua_selectors.create_selector_closure(cfg, rule.selector) if not sel then rspamd_logger.errx(cfg, 'cannot add selector for element %s in module %s', @@ -176,7 +176,8 @@ local function create(cfg, obj, module_name) return nil end - local expr = rspamd_expression.create(obj.expression, parse_atom, rspamd_config:get_mempool()) + local expr = rspamd_expression.create(obj.expression, parse_atom, + rspamd_config:get_mempool()) if not expr then rspamd_logger.errx(cfg, 'cannot add map expression for module %s', -- 2.39.5