aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-03-03 22:05:05 +0000
committerMatthew Wild <mwild1@gmail.com>2010-03-03 22:05:05 +0000
commit8862e1b27eb767c99a068d13bd15c77c2c9e1471 (patch)
tree067f338a5f8e31a6b1fb6ca706562a044af80024 /net/dns.lua
parent87ff54c75266ffa37f716d1c7a542e956bbe54b3 (diff)
parent5d9b9b6b30f06a3e3aa957279357dd42ae19ddf4 (diff)
downloadprosody-8862e1b27eb767c99a068d13bd15c77c2c9e1471.tar.gz
prosody-8862e1b27eb767c99a068d13bd15c77c2c9e1471.zip
Merge 0.6.2/waqas with 0.6.2/MattJ
Diffstat (limited to 'net/dns.lua')
-rw-r--r--net/dns.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/dns.lua b/net/dns.lua
index ca0ec622..1b5321af 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -594,17 +594,18 @@ end
function resolver:remember(rr, type) -- - - - - - - - - - - - - - remember
--print ('remember', type, rr.class, rr.type, rr.name)
+ local qname, qtype, qclass = standardize(rr.name, rr.type, rr.class);
if type ~= '*' then
- type = rr.type;
- local all = get(self.cache, rr.class, '*', rr.name);
+ type = qtype;
+ local all = get(self.cache, qclass, '*', qname);
--print('remember all', all);
if all then append(all, rr); end
end
self.cache = self.cache or setmetatable({}, cache_metatable);
- local rrs = get(self.cache, rr.class, type, rr.name) or
- set(self.cache, rr.class, type, rr.name, setmetatable({}, rrs_metatable));
+ local rrs = get(self.cache, qclass, type, qname) or
+ set(self.cache, qclass, type, qname, setmetatable({}, rrs_metatable));
append(rrs, rr);
if type == 'MX' then self.unsorted[rrs] = true; end