From: Mikhail Galanin Date: Fri, 7 Sep 2018 16:51:57 +0000 (+0100) Subject: [Minor] Fixed symbol registering in antivirus module - parent is expected to be double X-Git-Tag: 1.8.0~166^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2468%2Fhead;p=thirdparty%2Frspamd.git [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 --- diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 37c58bcf87..46ea8c40d1 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