]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[688] Make Message::hasRRset() const
authorMukund Sivaraman <muks@isc.org>
Thu, 9 Jan 2014 04:57:31 +0000 (10:27 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 9 Jan 2014 04:57:31 +0000 (10:27 +0530)
src/lib/dns/message.cc
src/lib/dns/message.h

index 89da4979ff80a9b04a5a945abf56cc02edb904dc..b3804341e322e04ac1656c6f9662734a8f307f1b 100644 (file)
@@ -522,7 +522,7 @@ Message::addRRset(const Section section, RRsetPtr rrset) {
 
 bool
 Message::hasRRset(const Section section, const Name& name,
-                  const RRClass& rrclass, const RRType& rrtype)
+                  const RRClass& rrclass, const RRType& rrtype) const
 {
     if (static_cast<int>(section) >= MessageImpl::NUM_SECTIONS) {
         isc_throw(OutOfRange, "Invalid message section: " << section);
@@ -540,8 +540,9 @@ Message::hasRRset(const Section section, const Name& name,
 }
 
 bool
-Message::hasRRset(const Section section, const RRsetPtr& rrset) {
-    return (hasRRset(section, rrset->getName(), rrset->getClass(), rrset->getType()));
+Message::hasRRset(const Section section, const RRsetPtr& rrset) const {
+    return (hasRRset(section, rrset->getName(),
+                     rrset->getClass(), rrset->getType()));
 }
 
 bool
index 1c83e1eec3f8527ea0309a02753671fdf0baffee..aaa0d76982d76fcdf86c746b2b41d2fc4e5df444 100644 (file)
@@ -481,14 +481,14 @@ public:
     /// This should probably be extended to be a "find" method that returns
     /// a matching RRset if found.
     bool hasRRset(const Section section, const Name& name,
-                  const RRClass& rrclass, const RRType& rrtype);
+                  const RRClass& rrclass, const RRType& rrtype) const;
 
     /// \brief Determine whether the given section already has an RRset
     /// matching the one pointed to by the argumet
     ///
     /// \c section must be a valid constant of the \c Section type;
     /// otherwise, an exception of class \c OutOfRange will be thrown.
-    bool hasRRset(const Section section, const RRsetPtr& rrset);
+    bool hasRRset(const Section section, const RRsetPtr& rrset) const;
 
     /// \brief Remove RRSet from Message
     ///