From: bert hubert Date: Sun, 27 Sep 2015 15:07:42 +0000 (+0200) Subject: start moving away from DNSResourceRecord in the recursor. Baby steps. Two places... X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~28^2~27^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48b560ea60cc89264dcb40d22404943f5db180de;p=pdns start moving away from DNSResourceRecord in the recursor. Baby steps. Two places left. --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 3070925d0..9a31f3d62 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -375,9 +375,9 @@ int SyncRes::doResolve(const DNSName &qname, const QType &qtype, vectord_place == DNSResourceRecord::ANSWER) - ret.push_back(*i); + for(const auto& rec : lwr.d_records) { + if((DNSResourceRecord::Place)rec.first.d_place == DNSResourceRecord::ANSWER) + ret.push_back(DNSResourceRecord(rec.first)); } return res; } @@ -1026,8 +1026,8 @@ int SyncRes::doResolveAt(set nameservers, DNSName auth, bool flawedNSSe } if(s_minimumTTL) { - for(LWResult::res_t::iterator i=lwr.getResult().begin();i != lwr.getResult().end();++i) { - i->ttl = max(i->ttl, s_minimumTTL); + for(auto& rec : lwr.d_records) { + rec.first.d_ttl = max(rec.first.d_ttl, s_minimumTTL); } }