]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Really fix chained SA dependencies 1213/head
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 1 Dec 2016 11:48:36 +0000 (11:48 +0000)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 1 Dec 2016 11:54:44 +0000 (13:54 +0200)
Conflicts:
src/plugins/lua/spamassassin.lua

src/plugins/lua/spamassassin.lua

index 27940212a801ec9e2a428c04e8dfaf0e3f523eab..64e1308092514b9a86209a52edc41a4df374cea1 100644 (file)
@@ -1495,7 +1495,7 @@ local function post_process()
         local expr_atoms = r['expression']:atoms()
         for i,a in ipairs(expr_atoms) do
           if type(external_deps[a]) == 'table' then
-            for _,dep in ipairs(external_deps[a]) do
+            for dep in pairs(external_deps[a]) do
               if not external_deps[k] then
                 external_deps[k] = {}
               end
@@ -1503,11 +1503,11 @@ local function post_process()
                 rspamd_config:register_dependency(k, dep)
                 external_deps[k][dep] = true
                 rspamd_logger.debugx(rspamd_config,
-                  'atom %1 is a direct foreign dependency, ' ..
+                  'atom %1 is an indirect foreign dependency, ' ..
                   'register dependency for %2 on %3',
                   a, k, dep)
+                  nchanges = nchanges + 1
               end
-              nchanges = nchanges + 1
             end
           else
             local rspamd_symbol, replaced_symbol = replace_symbol(a)