From a5c1b943e4e9689a91bef6303be3db8b92fe4fa1 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Wed, 30 Sep 2015 20:19:32 +0200 Subject: [PATCH] move to the centralised DNSRecord -> DNSResourceRecord converter --- pdns/dnsrecords.cc | 1 + pdns/lwres.cc | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 489205227..b4b3ca81b 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 cc15d396a..08206126c 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); } } -- 2.40.0