Browse Source

[1176] Cleanup of previous commit

* Avoid infinite recursion - the operator | kind of happened to call
  itself by accident.
* Re-added lost | dnssec_opt_.
Michal 'vorner' Vaner 13 years ago
parent
commit
04b04226b7
2 changed files with 3 additions and 2 deletions
  1. 1 1
      src/bin/auth/query.cc
  2. 2 1
      src/lib/datasrc/zone.h

+ 1 - 1
src/bin/auth/query.cc

@@ -67,7 +67,7 @@ Query::findAddrs(ZoneFinder& zone, const Name& qname,
     // Find A rrset
     if (qname_ != qname || qtype_ != RRType::A()) {
         ZoneFinder::FindResult a_result = zone.find(qname, RRType::A(), NULL,
-                                                    options);
+                                                    options | dnssec_opt_);
         if (a_result.code == ZoneFinder::SUCCESS) {
             response_.addRRset(Message::SECTION_ADDITIONAL,
                     boost::const_pointer_cast<RRset>(a_result.rrset), dnssec_);

+ 2 - 1
src/lib/datasrc/zone.h

@@ -214,7 +214,8 @@ public:
 inline ZoneFinder::FindOptions operator |(ZoneFinder::FindOptions a,
                                           ZoneFinder::FindOptions b)
 {
-    return (static_cast<ZoneFinder::FindOptions>(a | b));
+    return (static_cast<ZoneFinder::FindOptions>(static_cast<unsigned>(a) |
+                                                 static_cast<unsigned>(b)));
 }
 
 /// \brief A pointer-like type pointing to a \c ZoneFinder object.