From: bert hubert Date: Wed, 30 Sep 2015 18:19:32 +0000 (+0200) Subject: move to the centralised DNSRecord -> DNSResourceRecord converter X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~28^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5c1b943e4e9689a91bef6303be3db8b92fe4fa1;p=thirdparty%2Fpdns.git move to the centralised DNSRecord -> DNSResourceRecord converter --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 489205227f..b4b3ca81ba 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -70,6 +70,7 @@ bool DNSResourceRecord::operator==(const DNSResourceRecord& rhs) DNSResourceRecord::DNSResourceRecord(const DNSRecord &p) { auth=true; + qclass = p.d_class; disabled=false; qname = p.d_label; d_place = (DNSResourceRecord::Place)p.d_place; diff --git a/pdns/lwres.cc b/pdns/lwres.cc index cc15d396a3..08206126c1 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -1,6 +1,6 @@ /* PowerDNS Versatile Database Driven Nameserver - Copyright (C) 2002 - 2014 PowerDNS.COM BV + Copyright (C) 2002 - 2015 PowerDNS.COM BV This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as @@ -203,12 +203,7 @@ vector& LWResult::getResult() { if(d_result.empty()) { for(auto i=d_records.cbegin(); i != d_records.cend(); ++i) { - DNSResourceRecord rr; - rr.qtype=i->first.d_type; - rr.qname=i->first.d_label; - rr.ttl=i->first.d_ttl; - rr.content=i->first.d_content->getZoneRepresentation(); // this should be the serialised form - rr.d_place=(DNSResourceRecord::Place) i->first.d_place; + DNSResourceRecord rr(i->first); d_result.push_back(rr); } }