From: Jelte Jansen Date: Fri, 11 May 2012 13:32:48 +0000 (-0700) Subject: [1207] fix two memory/cast issues in modified code X-Git-Tag: trac2351_base~226^2~90^2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c17d922ffe421fbbcbffab695cfeb01cdc316bca;p=thirdparty%2Fkea.git [1207] fix two memory/cast issues in modified code See http://bind10.isc.org/ticket/1207#comment:11 --- diff --git a/src/bin/auth/command.cc b/src/bin/auth/command.cc index bd4c1c1425..12f0b2bd08 100644 --- a/src/bin/auth/command.cc +++ b/src/bin/auth/command.cc @@ -229,7 +229,7 @@ private: " is not found in data source"); } - old_zone_finder_ = boost::dynamic_pointer_cast( + old_zone_finder_ = boost::static_pointer_cast( result.zone_finder); return (true); diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc index ac762e8e24..c7f08be993 100644 --- a/src/bin/auth/tests/auth_srv_unittest.cc +++ b/src/bin/auth/tests/auth_srv_unittest.cc @@ -89,6 +89,10 @@ protected: server.setStatisticsSession(&statistics_session); } + ~AuthSrvTest() { + parse_message->clear(Message::PARSE); + } + virtual void processMessage() { // If processMessage has been called before, parse_message needs // to be reset. If it hasn't, there's no harm in doing so