From: Vsevolod Stakhov Date: Sat, 6 Feb 2016 03:04:52 +0000 (+0000) Subject: Fix metas memoization in SA plugin X-Git-Tag: 1.1.4~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c762dcf8f851cef3b221198506328e9b2a3dfea4;p=rspamd.git Fix metas memoization in SA plugin --- diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua index 37689c13f..f2d7a4c4e 100644 --- a/src/plugins/lua/spamassassin.lua +++ b/src/plugins/lua/spamassassin.lua @@ -1206,13 +1206,16 @@ local function post_process() local meta_cb = function(task) local res = 0 -- XXX: need to memoize result for better performance - if not task:get_symbol(k) then + local sym = task:get_symbol(k) + if not sym then if expression then res = expression:process(task) end if res > 0 then task:insert_result(k, res) end + else + res = 1 end return res