commit 5aefad0: [Minor] Fix selectors usage

Vsevolod Stakhov vsevolod at highsecure.ru
Mon May 20 17:07:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-05-20 16:58:27 +0100
URL: https://github.com/rspamd/rspamd/commit/5aefad0f52cabf4dacdf85d69a93ff3d9596f6d4

[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',


More information about the Commits mailing list