]> granicus.if.org Git - pdns/commitdiff
move to the centralised DNSRecord -> DNSResourceRecord converter
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 30 Sep 2015 18:19:32 +0000 (20:19 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 30 Sep 2015 18:19:32 +0000 (20:19 +0200)
pdns/dnsrecords.cc
pdns/lwres.cc

index 489205227fbc0f8b77185b47b99680ccc7a0259b..b4b3ca81bae31902ccc58e5f389b8461082a6481 100644 (file)
@@ -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;
index cc15d396a3ee628b38c15598d9067843943b3270..08206126c18983897119d80272f698d63711c20b 100644 (file)
@@ -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<DNSResourceRecord>& 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);
     }
   }