]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] rspamadm statconvert: Oops- fix variable clobbering 852/head
authorAndrew Lewis <nerf@judo.za.org>
Tue, 16 Aug 2016 10:06:26 +0000 (12:06 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 16 Aug 2016 10:06:26 +0000 (12:06 +0200)
src/rspamadm/stat_convert.lua

index 93171a7392ab32b425fbd90d05aaa71777b6508e..c8eb78c01bb26671d054b5d5e26c66b7b77a5f8a 100644 (file)
@@ -33,7 +33,7 @@ local function send_redis(server, symbol, tokens, password, db, cmd)
   return ret
 end
 
-local function convert_learned(cache, server, password, db)
+local function convert_learned(cache, server, password, redis_db)
   local converted = 0
   local db = sqlite3.open(cache)
   local ret = true
@@ -57,8 +57,8 @@ local function convert_learned(cache, server, password, db)
   if password then
     conn:add_cmd('AUTH', {password})
   end
-  if db then
-    conn:add_cmd('SELECT', {db})
+  if redis_db then
+    conn:add_cmd('SELECT', {redis_db})
   end
 
   for row in db:rows('SELECT * FROM learns;') do