From: Michal 'vorner' Vaner Date: Fri, 3 May 2013 07:53:07 +0000 (+0200) Subject: Don't rely on friends X-Git-Tag: bind10-1.2.0beta1-release~474^2~6^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=673bbeb9b8b1ecd0629c0807578624705c58085b;p=thirdparty%2Fkea.git 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. --- diff --git a/src/bin/resolver/bench/fake_resolution.cc b/src/bin/resolver/bench/fake_resolution.cc index c08e45a3ce..7587e6eb26 100644 --- a/src/bin/resolver/bench/fake_resolution.cc +++ b/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; diff --git a/src/bin/resolver/bench/fake_resolution.h b/src/bin/resolver/bench/fake_resolution.h index c2011d3554..cf2219c839 100644 --- a/src/bin/resolver/bench/fake_resolution.h +++ b/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 Step;