]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix some issues in redis settings 1180/head
authorAndrew Lewis <nerf@judo.za.org>
Fri, 25 Nov 2016 08:45:57 +0000 (10:45 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 25 Nov 2016 08:45:57 +0000 (10:45 +0200)
src/plugins/lua/settings.lua

index cdff4b853d61382bf64996a060a0348a404bd4f0..fffa7cfbbaf5d3984b66b9c1d9ba70a4c1689c38 100644 (file)
@@ -570,7 +570,7 @@ if redis_section then
   if redis_params then
     local handlers = redis_section.handlers
 
-    for _,h in ipairs(handlers) do
+    for id,h in pairs(handlers) do
       local chunk,err = load(h)
 
       if not chunk then
@@ -582,7 +582,7 @@ if redis_section then
           rspamd_logger.errx(rspamd_config, 'Cannot add handler from string: %s',
             tostring(func))
         else
-          table.insert(redis_key_handlers, func)
+          redis_key_handlers[id] = func
         end
       end
     end