# HG changeset patch # User Matthew Wild # Date 1253832436 -3600 # Node ID 7c3ec7ac6316b782a4c19ae38f3bb4b95f971e8a # Parent ed1911be26c74664918481019b2c56d7ae9c09b6# Parent 2f78ea5d0f112d01c1e428688a71afc620648545 Merge with 0.5 diff -r ed1911be26c7 -r 7c3ec7ac6316 net/dns.lua --- a/net/dns.lua Fri Sep 25 03:23:31 2009 +0500 +++ b/net/dns.lua Thu Sep 24 23:47:16 2009 +0100 @@ -95,7 +95,10 @@ if rr.tod then -- rr.tod = rr.tod - 50 -- accelerated decripitude rr.ttl = math.floor (rr.tod - time) - if rr.ttl <= 0 then rrs[i] = nil end + if rr.ttl <= 0 then + table.remove(rrs, i); + return prune(rrs, time, soft); -- Re-iterate + end elseif soft == 'soft' then -- What is this? I forget! assert (rr.ttl == 0) @@ -507,7 +510,7 @@ local resolv_conf = io.open("/etc/resolv.conf"); if resolv_conf then for line in resolv_conf:lines() do - local address = string.match (line, '^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)') + local address = string.match (line, '^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)%s*$') if address then self:addnameserver (address) end end elseif os.getenv("WINDIR") then diff -r ed1911be26c7 -r 7c3ec7ac6316 plugins/mod_console.lua --- a/plugins/mod_console.lua Fri Sep 25 03:23:31 2009 +0500 +++ b/plugins/mod_console.lua Thu Sep 24 23:47:16 2009 +0100 @@ -515,7 +515,7 @@ if not session then print("No outgoing connection from "..from.." to "..to) else - s2smanager.destroy_session(session); + (session.close or s2smanager.destroy_session)(session); count = count + 1; print("Closed outgoing session from "..from.." to "..to); end @@ -523,7 +523,7 @@ -- Is an incoming connection for session in pairs(incoming_s2s) do if session.to_host == to and session.from_host == from then - s2smanager.destroy_session(session); + (session.close or s2smanager.destroy_session)(session); count = count + 1; end end