]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
Don't rely on friends
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Fri, 3 May 2013 07:53:07 +0000 (09:53 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Fri, 3 May 2013 07:53:07 +0000 (09:53 +0200)
Fix compilation on SunStudio. Avoid relying on combination of friend
declaration and nested class, which SunStudio gets wrong as it's quite
complex.

src/bin/resolver/bench/fake_resolution.cc
src/bin/resolver/bench/fake_resolution.h

index c08e45a3ce29f996c0a07f377b9c4a92073951d9..7587e6eb26338740c558719e97a77eef19aae3cb 100644 (file)
@@ -144,7 +144,7 @@ public:
         timer_(timer)
     {}
     void trigger() {
-        query_->outstanding_ = false;
+        query_->answerReceived();
         callback_();
         // We are not needed any more.
         delete this;
index c2011d3554ef81643ece52bbb65baef0803e7cdd..cf2219c8397c0ca46f8c900638645cacc5cbb672 100644 (file)
@@ -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;