Browse Source

Don't rely on friends

Fix compilation on SunStudio. Avoid relying on combination of friend
declaration and nested class, which SunStudio gets wrong as it's quite
complex.
Michal 'vorner' Vaner 12 years ago
parent
commit
673bbeb9b8

+ 1 - 1
src/bin/resolver/bench/fake_resolution.cc

@@ -144,7 +144,7 @@ public:
         timer_(timer)
     {}
     void trigger() {
-        query_->outstanding_ = false;
+        query_->answerReceived();
         callback_();
         // We are not needed any more.
         delete this;

+ 7 - 0
src/bin/resolver/bench/fake_resolution.h

@@ -142,6 +142,13 @@ public:
         }
         interface_ = &dst_interface;
     }
+    /// \brief The answer for upstream query was received
+    ///
+    /// This should be called from within the FakeInterface only.
+    /// It marks that the query from upstream was answered.
+    void answerReceived() {
+        outstanding_ = false;
+    }
 private:
     // The scheduled steps for this task.
     typedef std::pair<Task, size_t> Step;