commit 4623a10: [Minor] Fix some issues

Vsevolod Stakhov vsevolod at rspamd.com
Sat Nov 19 20:28:17 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-11-13 20:33:37 +0000
URL: https://github.com/rspamd/rspamd/commit/4623a10e17a3a838fd174751a5d998746bd16700

[Minor] Fix some issues

---
 lualib/lua_maps.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lualib/lua_maps.lua b/lualib/lua_maps.lua
index 88f0b894a..21480ad63 100644
--- a/lualib/lua_maps.lua
+++ b/lualib/lua_maps.lua
@@ -202,9 +202,9 @@ local function rspamd_map_add_from_ucl(opt, mtype, description, callback)
       if t.__data then
         local cb = key_callback or callback
         if t.__external then
-          if cb or not task then
+          if not cb or not task then
             local caller = debug.getinfo(2) or {}
-            rspamd_logger.errx(rspamd_config, "requested external map key without callback; caller: %s:%s",
+            rspamd_logger.errx(rspamd_config, "requested external map key without callback or task; caller: %s:%s",
                 caller.short_src, caller.currentline)
             return nil
           end


More information about the Commits mailing list