From 1bf1610e3723c15d333d00531b0d4662b88c7247 Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Fri, 7 Sep 2018 17:51:57 +0100 Subject: [PATCH] [Minor] Fixed symbol registering in antivirus module - parent is expected to be double For some reasons, it is affecting rarely. Related tests are failing one out of 10 times --- src/plugins/lua/antivirus.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 37c58bcf8..46ea8c40d 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -889,10 +889,16 @@ if opts and type(opts) == 'table' then for _, p in ipairs(m['patterns']) do if type(p) == 'table' then for sym in pairs(p) do + rspamd_logger.debugm(N, rspamd_config, 'registering: %1', { + type = 'virtual', + name = sym, + parent = m['symbol'], + parent_id = id, + }) rspamd_config:register_symbol({ type = 'virtual', name = sym, - parent = m['symbol'] + parent = id }) end end -- 2.39.5