From: Jelte Jansen Date: Wed, 16 May 2012 11:49:32 +0000 (+0200) Subject: [1207] add comments X-Git-Tag: trac2351_base~226^2~90^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abcaba769071a7e93cd40f55fc2b44e216991163;p=thirdparty%2Fkea.git [1207] add comments --- diff --git a/src/bin/auth/command.cc b/src/bin/auth/command.cc index 12f0b2bd08..750ea28309 100644 --- a/src/bin/auth/command.cc +++ b/src/bin/auth/command.cc @@ -229,6 +229,9 @@ private: " is not found in data source"); } + // It would appear that dynamic_cast does not work on all systems; + // it seems to confuse the RTTI system, resulting in NULL return + // values. So we use the more dangerous static_pointer_cast here. old_zone_finder_ = boost::static_pointer_cast( result.zone_finder); diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc index f3e62a45fb..2f1f404a31 100644 --- a/src/bin/auth/tests/auth_srv_unittest.cc +++ b/src/bin/auth/tests/auth_srv_unittest.cc @@ -91,6 +91,9 @@ protected: } ~AuthSrvTest() { + // Clear the message now; depending on the RTTI implementation, + // type information may be lost if the message is cleared + // automatically later, so as a precaution we do it now. parse_message->clear(Message::PARSE); }