From: JINMEI Tatuya Date: Thu, 20 Oct 2011 23:33:44 +0000 (-0700) Subject: [1307] (unrelated) clarification cleanup: process()/putSOA()/addNXDOMAINProof() X-Git-Tag: perftcpdns_before_epoll~75^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a6bcde01f641bf024e9179d2e753d7d2ef4df41;p=thirdparty%2Fkea.git [1307] (unrelated) clarification cleanup: process()/putSOA()/addNXDOMAINProof() cannot be const because they modify response_. maybe we should pass the response via method parameter rather than at the construction time, or even make this a simple free function, rather than a class. but that will be a separate discussion. --- diff --git a/src/bin/auth/query.cc b/src/bin/auth/query.cc index d743d59c2c..85c8050eab 100644 --- a/src/bin/auth/query.cc +++ b/src/bin/auth/query.cc @@ -88,7 +88,7 @@ Query::findAddrs(ZoneFinder& zone, const Name& qname, } void -Query::putSOA(ZoneFinder& zone) const { +Query::putSOA(ZoneFinder& zone) { ZoneFinder::FindResult soa_result(zone.find(zone.getOrigin(), RRType::SOA(), NULL, dnssec_opt_)); if (soa_result.code != ZoneFinder::SUCCESS) { @@ -106,7 +106,7 @@ Query::putSOA(ZoneFinder& zone) const { } void -Query::addNXDOMAINProof(ZoneFinder& finder, ConstRRsetPtr nsec) const { +Query::addNXDOMAINProof(ZoneFinder& finder, ConstRRsetPtr nsec) { // TODO: Handle unexpected (buggy case): rrset is not NSEC response_.addRRset( Message::SECTION_AUTHORITY, @@ -159,7 +159,7 @@ Query::getAuthAdditional(ZoneFinder& zone) const { } void -Query::process() const { +Query::process() { bool keep_doing = true; const bool qtype_is_any = (qtype_ == RRType::ANY()); diff --git a/src/bin/auth/query.h b/src/bin/auth/query.h index 03c4bf64b1..7d3edc81c7 100644 --- a/src/bin/auth/query.h +++ b/src/bin/auth/query.h @@ -69,11 +69,11 @@ private: /// Adds a SOA of the zone into the authority zone of response_. /// Can throw NoSOA. /// - void putSOA(isc::datasrc::ZoneFinder& zone) const; + void putSOA(isc::datasrc::ZoneFinder& zone); /// TBD void addNXDOMAINProof(isc::datasrc::ZoneFinder& finder, - isc::dns::ConstRRsetPtr nsec) const; + isc::dns::ConstRRsetPtr nsec); /// \brief Look up additional data (i.e., address records for the names /// included in NS or MX records). @@ -180,7 +180,7 @@ public: /// This might throw BadZone or any of its specific subclasses, but that /// shouldn't happen in real-life (as BadZone means wrong data, it should /// have been rejected upon loading). - void process() const; + void process(); /// \short Bad zone data encountered. ///