Browse Source

[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.

JINMEI Tatuya 13 years ago
parent
commit
0a6bcde01f
2 changed files with 6 additions and 6 deletions
  1. 3 3
      src/bin/auth/query.cc
  2. 3 3
      src/bin/auth/query.h

+ 3 - 3
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());
 

+ 3 - 3
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.
     ///