]> source.dussan.org Git - rspamd.git/commitdiff
Fixes from previous commit.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 10 Jun 2011 13:43:29 +0000 (17:43 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 10 Jun 2011 13:43:29 +0000 (17:43 +0400)
src/dns.c
src/plugins/lua/multimap.lua
src/plugins/lua/trie.lua

index da467f664b128bf28a5ee6d5d8c1381ad5ffa0e6..4adab9af90af16e0b42283a7d72397f3c0b0a820 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -1016,7 +1016,6 @@ dns_read_cb (gint fd, short what, void *arg)
                        }
                        upstream_ok (&rep->request->server->up, rep->request->time);
                        rep->request->func (rep, rep->request->arg);
-                       remove_normal_event (req->session, dns_fin_cb, req);
                }
        }
 }
index 5d1312dc25becdcc799dd6c6c2f91563bd8b3876..8a0596115f37fd6e657d6bdb5cd6c52ffe0f376f 100644 (file)
@@ -45,12 +45,12 @@ function check_multimap(task)
                if rule['type'] == 'ip' then
                        if rule['cdb'] then
                                local ip = task:get_from_ip()
-                               if rule['hash']:lookup(ip) then
+                               if ip and rule['hash']:lookup(ip) then
                                        task:insert_result(rule['symbol'], 1)
                                end
                        else
                                local ip = task:get_from_ip_num()
-                               if rule['ips']:get_key(ip) then
+                               if ip and rule['ips']:get_key(ip) then
                                        task:insert_result(rule['symbol'], 1)
                                end
                        end
index 6b1782a00dcf793bbf82a833b2de83912a3e8562..152935d8b97d3d360359b75eedfb952188b467db 100644 (file)
@@ -69,7 +69,7 @@ function check_trie(task)
                -- Search inside urls
                urls = task:get_urls()
                if urls then
-                       for _,url in urls do
+                       for _,url in ipairs(urls) do
                                if trie['trie']:search_text(url:get_text()) then
                                        task:insert_result(trie['symbol'], 1)
                                end