From 7e6a79047a4675f60227d57b05f9af1b1540bde6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 10 Jun 2011 17:43:29 +0400 Subject: [PATCH] Fixes from previous commit. --- src/dns.c | 1 - src/plugins/lua/multimap.lua | 4 ++-- src/plugins/lua/trie.lua | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dns.c b/src/dns.c index da467f664..4adab9af9 100644 --- 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); } } } diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 5d1312dc2..8a0596115 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -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 diff --git a/src/plugins/lua/trie.lua b/src/plugins/lua/trie.lua index 6b1782a00..152935d8b 100644 --- a/src/plugins/lua/trie.lua +++ b/src/plugins/lua/trie.lua @@ -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 -- 2.39.5