]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fixed symbol registering in antivirus module - parent is expected to be double 2468/head
authorMikhail Galanin <mgalanin@mimecast.com>
Fri, 7 Sep 2018 16:51:57 +0000 (17:51 +0100)
committerMikhail Galanin <mgalanin@mimecast.com>
Fri, 7 Sep 2018 16:51:57 +0000 (17:51 +0100)
For some reasons, it is affecting rarely. Related tests are failing one out of 10 times

src/plugins/lua/antivirus.lua

index 37c58bcf87a9da603ee3e81e0c0bc423c4e3c432..46ea8c40d102e4d12a02f7dbbdf28c58cf07f887 100644 (file)
@@ -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