]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix warnings 1382/head
authorAndrew Lewis <nerf@judo.za.org>
Sat, 28 Jan 2017 15:05:24 +0000 (17:05 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Sat, 28 Jan 2017 15:05:24 +0000 (17:05 +0200)
 - Also yield symbol when key in Redis was used

src/plugins/lua/dkim_signing.lua

index 5a6dcfdc0be8ddc21dfc5d4e5955bd6eafafa816..345c91fcb1e64fc056dc626ae358461ac5422156 100644 (file)
@@ -126,7 +126,6 @@ local function dkim_signing_cb(task)
   if settings.use_redis then
     p.key = nil
     local rk = string.format('%s.%s', p.selector, p.domain)
-    local ret, upstream
 
     local function redis_key_cb(err, data)
       if err or type(data) ~= 'string' then
@@ -134,11 +133,13 @@ local function dkim_signing_cb(task)
           rk, err)
       else
         p.rawkey = data
-        rspamd_plugins.dkim.sign(task, p)
+        if rspamd_plugins.dkim.sign(task, p) then
+          task:insert_result(settings.symbol, 1.0)
+        end
       end
     end
 
-    ret,_,upstream = rspamd_redis_make_request(task,
+    local ret = rspamd_redis_make_request(task,
       redis_params, -- connect params
       rk, -- hash key
       true, -- is write