commit b63019b: [Minor] Multimap: Fix redis query

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jul 17 12:42:07 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-17 13:35:48 +0100
URL: https://github.com/rspamd/rspamd/commit/b63019b9702cd7c4b843a7f52b64d41b8d1b539e (HEAD -> master)

[Minor] Multimap: Fix redis query

---
 src/plugins/lua/multimap.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index da8ad81b9..b87636bd0 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -388,7 +388,7 @@ local function multimap_query_redis(key, task, value, callback)
     cmd = 'HMGET'
   end
 
-  local srch = {cmd, key}
+  local srch = {key}
 
   -- Insert all ips for some mask :(
   if type(value) == 'userdata' and value.class == 'rspamd{ip}' then
@@ -409,6 +409,8 @@ local function multimap_query_redis(key, task, value, callback)
   end
 
   local function redis_map_cb(err, data)
+    lua_util.debugm(N, task, 'got reply from Redis when trying to get key %s: err=%s, data=%s',
+        key, err, data)
     if not err and type(data) ~= 'userdata' then
       callback(data)
     end


More information about the Commits mailing list