diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-06 03:04:52 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-06 03:04:52 +0000 |
commit | 2f54afd919dd4ac809a7ed7557d703b69660cdf4 (patch) | |
tree | dcc160762dfbe4f729dbfed7f898ef818f32a093 | |
parent | 7df5bfca79c8ea68f1b80c1f2463d189352134f1 (diff) | |
download | rspamd-2f54afd919dd4ac809a7ed7557d703b69660cdf4.tar.gz rspamd-2f54afd919dd4ac809a7ed7557d703b69660cdf4.zip |
Fix metas memoization in SA plugin
-rw-r--r-- | src/plugins/lua/spamassassin.lua | 5 |
1 files changed, 4 insertions, 1 deletions
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 |