]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] On statistics_dump opts.cdb was doing dump_out and vice-versa 5335/head
authorJose Celestino <japc@co.sapo.pt>
Thu, 6 Feb 2025 01:47:28 +0000 (01:47 +0000)
committerJose Celestino <japc@co.sapo.pt>
Thu, 6 Feb 2025 01:47:28 +0000 (01:47 +0000)
lualib/rspamadm/statistics_dump.lua

index cbd0bce142a143e55f85da999cfe615a886e7a07..6a08d11fdef61d1df6940b9524b45e0edfb85966 100644 (file)
@@ -293,11 +293,11 @@ local function dump_pattern(conn, pattern, opts, out, key)
     -- Do not write the last chunk of out as it will be processed afterwards
     if cursor ~= 0 then
       if opts.cdb then
-        dump_out(out, opts, false)
-        clear_fcn(out)
-      else
         dump_cdb(out, opts, false, key)
         out[key].elts = {}
+      else
+        dump_out(out, opts, false)
+        clear_fcn(out)
       end
     elseif opts.cdb then
       dump_cdb(out, opts, true, key)