]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1307] (unrelated) clarification cleanup: process()/putSOA()/addNXDOMAINProof()
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 20 Oct 2011 23:33:44 +0000 (16:33 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 20 Oct 2011 23:33:44 +0000 (16:33 -0700)
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.

src/bin/auth/query.cc
src/bin/auth/query.h

index d743d59c2ca9ffa92195994bca2a1e86fac11d7d..85c8050eabaeb78b3b7c2de87341b12bd1c82e3c 100644 (file)
@@ -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());
 
index 03c4bf64b1cbfec70389ca3255ae2ef7c44d1cd8..7d3edc81c73787240e7e5b39363dd3d78f376fe7 100644 (file)
@@ -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.
     ///