Software /
code /
prosody
Diff
net/dns.lua @ 2877:1edeb8fe7d14
Merge 0.6.2/waqas with 0.6.2/MattJ
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 03 Mar 2010 22:05:05 +0000 |
parent | 2788:fb47ac5ed04c |
parent | 2856:70e6ea49aff3 |
line wrap: on
line diff
--- a/net/dns.lua Fri Feb 19 03:30:27 2010 +0000 +++ b/net/dns.lua Wed Mar 03 22:05:05 2010 +0000 @@ -594,17 +594,18 @@ 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