Commit f1f4ce3e authored by Stephen Morris's avatar Stephen Morris

[1470] replaced shared_ptr by boost::shared_ptr

shared_ptr is a candidates for the next STL version and Windows has
already adopted it.  This change removes ambiguity between the Boost
and Windows versions of the class.
parent 0fd58479
......@@ -57,8 +57,6 @@
#include "resolver_log.h"
using namespace std;
using boost::shared_ptr;
using namespace isc;
using namespace isc::util;
using namespace isc::acl;
......@@ -167,7 +165,7 @@ public:
return (*query_acl_);
}
void setQueryACL(shared_ptr<const RequestACL> new_acl) {
void setQueryACL(boost::shared_ptr<const RequestACL> new_acl) {
query_acl_ = new_acl;
}
......@@ -195,7 +193,7 @@ public:
private:
/// ACL on incoming queries
shared_ptr<const RequestACL> query_acl_;
boost::shared_ptr<const RequestACL> query_acl_;
/// Object to handle upstream queries
RecursiveQuery* rec_query_;
......@@ -603,9 +601,9 @@ Resolver::updateConfig(ConstElementPtr config) {
AddressList listenAddresses(parseAddresses(listenAddressesE,
"listen_on"));
const ConstElementPtr query_acl_cfg(config->get("query_acl"));
const shared_ptr<const RequestACL> query_acl =
const boost::shared_ptr<const RequestACL> query_acl =
query_acl_cfg ? acl::dns::getRequestLoader().load(query_acl_cfg) :
shared_ptr<RequestACL>();
boost::shared_ptr<RequestACL>();
bool set_timeouts(false);
int qtimeout = impl_->query_timeout_;
int ctimeout = impl_->client_timeout_;
......@@ -771,7 +769,7 @@ Resolver::getQueryACL() const {
}
void
Resolver::setQueryACL(shared_ptr<const RequestACL> new_acl) {
Resolver::setQueryACL(boost::shared_ptr<const RequestACL> new_acl) {
if (!new_acl) {
isc_throw(InvalidParameter, "NULL pointer is passed to setQueryACL");
}
......
......@@ -32,7 +32,6 @@
#include <acl/logic_check.h>
using namespace std;
using boost::shared_ptr;
using namespace isc::dns;
using namespace isc::data;
......@@ -78,7 +77,7 @@ internal::RequestCheckCreator::names() const {
return (supported_names);
}
shared_ptr<RequestCheck>
boost::shared_ptr<RequestCheck>
internal::RequestCheckCreator::create(const string& name,
ConstElementPtr definition,
// unused:
......@@ -90,10 +89,10 @@ internal::RequestCheckCreator::create(const string& name,
}
if (name == "from") {
return (shared_ptr<internal::RequestIPCheck>(
return (boost::shared_ptr<internal::RequestIPCheck>(
new internal::RequestIPCheck(definition->stringValue())));
} else if (name == "key") {
return (shared_ptr<internal::RequestKeyCheck>(
return (boost::shared_ptr<internal::RequestKeyCheck>(
new internal::RequestKeyCheck(
Name(definition->stringValue()))));
} else {
......@@ -116,16 +115,17 @@ getRequestLoader() {
auto_ptr<RequestLoader>(new RequestLoader(REJECT));
// Register default check creator(s)
loader_ptr->registerCreator(shared_ptr<internal::RequestCheckCreator>(
loader_ptr->registerCreator(
boost::shared_ptr<internal::RequestCheckCreator>(
new internal::RequestCheckCreator()));
loader_ptr->registerCreator(
shared_ptr<NotCreator<RequestContext> >(
boost::shared_ptr<NotCreator<RequestContext> >(
new NotCreator<RequestContext>("NOT")));
loader_ptr->registerCreator(
shared_ptr<LogicCreator<AnyOfSpec, RequestContext> >(
boost::shared_ptr<LogicCreator<AnyOfSpec, RequestContext> >(
new LogicCreator<AnyOfSpec, RequestContext>("ANY")));
loader_ptr->registerCreator(
shared_ptr<LogicCreator<AllOfSpec, RequestContext> >(
boost::shared_ptr<LogicCreator<AllOfSpec, RequestContext> >(
new LogicCreator<AllOfSpec, RequestContext>("ALL")));
// From this point there shouldn't be any exception thrown
......
......@@ -70,10 +70,10 @@ public:
// Some convenience functions to set up
// Create a NamedCreator, convert to shared pointer
shared_ptr<NamedCreator> namedCreator(const string& name,
boost::shared_ptr<NamedCreator> namedCreator(const string& name,
bool abbreviatedList = true)
{
return (shared_ptr<NamedCreator>(new NamedCreator(name,
return (boost::shared_ptr<NamedCreator>(new NamedCreator(name,
abbreviatedList)));
}
// Create and add a NamedCreator
......@@ -81,20 +81,19 @@ public:
EXPECT_NO_THROW(loader_.registerCreator(
namedCreator(name, abbreviatedList)));
}
template<class Result> shared_ptr<Result> loadCheckAny(const string&
definition)
template<class Result> boost::shared_ptr<Result> loadCheckAny(
const string& definition)
{
SCOPED_TRACE("Loading check " + definition);
shared_ptr<Check<Log> > loaded;
boost::shared_ptr<Check<Log> > loaded;
EXPECT_NO_THROW(loaded = loader_.loadCheck(
Element::fromJSON(definition)));
shared_ptr<Result> result(dynamic_pointer_cast<Result>(
loaded));
boost::shared_ptr<Result> result(dynamic_pointer_cast<Result>(loaded));
EXPECT_TRUE(result);
return (result);
}
// Load a check and convert it to named check to examine it
shared_ptr<NamedCheck> loadCheck(const string& definition) {
boost::shared_ptr<NamedCheck> loadCheck(const string& definition) {
return (loadCheckAny<NamedCheck>(definition));
}
// The loadCheck throws an exception
......@@ -114,11 +113,12 @@ public:
// Insert the throw, throwcheck and logcheck checks into the loader
void aclSetup() {
try {
loader_.registerCreator(shared_ptr<ThrowCreator>(new
ThrowCreator()));
loader_.registerCreator(shared_ptr<ThrowCheckCreator>(
loader_.registerCreator(boost::shared_ptr<ThrowCreator>(
new ThrowCreator()));
loader_.registerCreator(boost::shared_ptr<ThrowCheckCreator>(
new ThrowCheckCreator()));
loader_.registerCreator(shared_ptr<LogCreator>(new LogCreator()));
loader_.registerCreator(boost::shared_ptr<LogCreator>(
new LogCreator()));
}
// We ignore this exception here, because it happens when we try to
// insert the creators multiple times. This is harmless.
......@@ -133,7 +133,7 @@ public:
{
SCOPED_TRACE("Running ACL for " + JSON);
aclSetup();
shared_ptr<ACL<Log> > acl;
boost::shared_ptr<ACL<Log> > acl;
EXPECT_NO_THROW(acl = loader_.load(Element::fromJSON(JSON)));
EXPECT_EQ(expectedResult, acl->execute(log_));
log_.checkFirst(logged);
......@@ -174,7 +174,7 @@ TEST_F(LoaderTest, CreatorDuplicateUnchanged) {
names.push_back("name1");
names.push_back("name3");
EXPECT_THROW(loader_.registerCreator(
shared_ptr<NamedCreator>(new NamedCreator(names))), LoaderError);
boost::shared_ptr<NamedCreator>(new NamedCreator(names))), LoaderError);
// It should now reject both name2 and name3 as not known
checkException("{\"name2\": null}");
checkException("{\"name3\": null}");
......@@ -183,7 +183,7 @@ TEST_F(LoaderTest, CreatorDuplicateUnchanged) {
// Test that we can register a creator and load a check with the name
TEST_F(LoaderTest, SimpleCheckLoad) {
addNamed("name");
shared_ptr<NamedCheck> check(loadCheck("{\"name\": 42}"));
boost::shared_ptr<NamedCheck> check(loadCheck("{\"name\": 42}"));
EXPECT_EQ("name", check->name_);
EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
}
......@@ -192,7 +192,7 @@ TEST_F(LoaderTest, SimpleCheckLoad) {
TEST_F(LoaderTest, MultiCreatorCheckLoad) {
addNamed("name1");
addNamed("name2");
shared_ptr<NamedCheck> check(loadCheck("{\"name2\": 42}"));
boost::shared_ptr<NamedCheck> check(loadCheck("{\"name2\": 42}"));
EXPECT_EQ("name2", check->name_);
EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
}
......@@ -203,9 +203,9 @@ TEST_F(LoaderTest, MultiNameCheckLoad) {
vector<string> names;
names.push_back("name2");
names.push_back("name3");
EXPECT_NO_THROW(loader_.registerCreator(shared_ptr<NamedCreator>(
EXPECT_NO_THROW(loader_.registerCreator(boost::shared_ptr<NamedCreator>(
new NamedCreator(names))));
shared_ptr<NamedCheck> check(loadCheck("{\"name3\": 42}"));
boost::shared_ptr<NamedCheck> check(loadCheck("{\"name3\": 42}"));
EXPECT_EQ("name3", check->name_);
EXPECT_TRUE(check->data_->equals(*Element::fromJSON("42")));
}
......@@ -230,7 +230,8 @@ TEST_F(LoaderTest, UnkownName) {
// Exception from the creator is propagated
TEST_F(LoaderTest, CheckPropagate) {
loader_.registerCreator(shared_ptr<ThrowCreator>(new ThrowCreator()));
loader_.registerCreator(boost::shared_ptr<ThrowCreator>(
new ThrowCreator()));
EXPECT_THROW(loader_.loadCheck(Element::fromJSON("{\"throw\": null}")),
TestCreatorError);
}
......@@ -239,7 +240,7 @@ TEST_F(LoaderTest, CheckPropagate) {
TEST_F(LoaderTest, AndAbbrev) {
addNamed("name1");
addNamed("name2");
shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
boost::shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
loadCheckAny<LogicOperator<AllOfSpec, Log> >("{\"name1\": 1, \"name2\": 2}"));
// If we don't have anything loaded, the rest would crash. It is already
// reported from within loadCheckAny if it isn't loaded.
......@@ -258,7 +259,7 @@ TEST_F(LoaderTest, AndAbbrev) {
// The abbreviated form of parameters
TEST_F(LoaderTest, OrAbbrev) {
addNamed("name1");
shared_ptr<LogicOperator<AnyOfSpec, Log> > oper(
boost::shared_ptr<LogicOperator<AnyOfSpec, Log> > oper(
loadCheckAny<LogicOperator<AnyOfSpec, Log> >("{\"name1\": [1, 2]}"));
// If we don't have anything loaded, the rest would crash. It is already
// reported from within loadCheckAny if it isn't loaded.
......@@ -276,7 +277,7 @@ TEST_F(LoaderTest, OrAbbrev) {
TEST_F(LoaderTest, BothAbbrev) {
addNamed("name1");
addNamed("name2");
shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
boost::shared_ptr<LogicOperator<AllOfSpec, Log> > oper(
loadCheckAny<LogicOperator<AllOfSpec, Log> >("{\"name1\": 1, \"name2\": [3, 4]}"));
// If we don't have anything loaded, the rest would crash. It is already
// reported from within loadCheckAny if it isn't loaded.
......@@ -302,7 +303,7 @@ TEST_F(LoaderTest, BothAbbrev) {
// creator
TEST_F(LoaderTest, ListCheck) {
addNamed("name1", false);
shared_ptr<NamedCheck> check(loadCheck("{\"name1\": [1, 2]}"));
boost::shared_ptr<NamedCheck> check(loadCheck("{\"name1\": [1, 2]}"));
EXPECT_EQ("name1", check->name_);
EXPECT_TRUE(check->data_->equals(*Element::fromJSON("[1, 2]")));
}
......@@ -310,7 +311,7 @@ TEST_F(LoaderTest, ListCheck) {
// Check the action key is ignored as it should be
TEST_F(LoaderTest, CheckNoAction) {
addNamed("name1");
shared_ptr<NamedCheck> check(loadCheck("{\"name1\": 1, \"action\": 2}"));
boost::shared_ptr<NamedCheck> check(loadCheck("{\"name1\": 1, \"action\": 2}"));
EXPECT_EQ("name1", check->name_);
EXPECT_TRUE(check->data_->equals(*Element::fromJSON("1")));
}
......
......@@ -52,7 +52,7 @@ testCheck(bool emptyResult) {
EXPECT_EQ(emptyResult, oper.matches(log));
log.checkFirst(0);
// Fill it with some subexpressions
typedef shared_ptr<ConstCheck> CheckPtr;
typedef boost::shared_ptr<ConstCheck> CheckPtr;
oper.addSubexpression(CheckPtr(new ConstCheck(emptyResult, 0)));
oper.addSubexpression(CheckPtr(new ConstCheck(emptyResult, 1)));
// Check what happens when only the default-valued are there
......@@ -80,7 +80,7 @@ TEST(LogicOperators, AnyOf) {
// Fixture for the tests of the creators
class LogicCreatorTest : public ::testing::Test {
private:
typedef shared_ptr<Loader<Log>::CheckCreator> CreatorPtr;
typedef boost::shared_ptr<Loader<Log>::CheckCreator> CreatorPtr;
public:
// Register some creators, both tested ones and some auxiliary ones for
// help
......@@ -102,12 +102,12 @@ public:
// Some convenience shortcut names
typedef LogicOperator<AnyOfSpec, Log> AnyOf;
typedef LogicOperator<AllOfSpec, Log> AllOf;
typedef shared_ptr<AnyOf> AnyOfPtr;
typedef shared_ptr<AllOf> AllOfPtr;
typedef boost::shared_ptr<AnyOf> AnyOfPtr;
typedef boost::shared_ptr<AllOf> AllOfPtr;
// Loads the JSON as a check and tries to convert it to the given check
// subclass
template<typename Result> shared_ptr<Result> load(const string& JSON) {
shared_ptr<Check<Log> > result;
template<typename Result> boost::shared_ptr<Result> load(const string& JSON) {
boost::shared_ptr<Check<Log> > result;
EXPECT_NO_THROW(result = loader_.loadCheck(Element::fromJSON(JSON)));
/*
* Optimally, we would use a dynamic_pointer_cast here to both
......@@ -122,9 +122,9 @@ public:
* multiple inheritance.
*/
EXPECT_STREQ(typeid(Result).name(), typeid(*result.get()).name());
shared_ptr<Result>
boost::shared_ptr<Result>
resultConverted(static_pointer_cast<Result>(result));
EXPECT_NE(shared_ptr<Result>(), resultConverted);
EXPECT_NE(boost::shared_ptr<Result>(), resultConverted);
return (resultConverted);
}
};
......@@ -244,7 +244,8 @@ TEST_F(LogicCreatorTest, nested) {
}
void notTest(bool value) {
NotOperator<Log> notOp(shared_ptr<Check<Log> >(new ConstCheck(value, 0)));
NotOperator<Log> notOp(boost::shared_ptr<Check<Log> >(
new ConstCheck(value, 0)));
Log log;
// It returns negated value
EXPECT_EQ(!value, notOp.matches(log));
......@@ -281,7 +282,7 @@ TEST_F(LogicCreatorTest, notInvalid) {
}
TEST_F(LogicCreatorTest, notValid) {
shared_ptr<NotOperator<Log> > notOp(load<NotOperator<Log> >("{\"NOT\":"
boost::shared_ptr<NotOperator<Log> > notOp(load<NotOperator<Log> >("{\"NOT\":"
" {\"logcheck\":"
" [0, true]}}"));
EXPECT_FALSE(notOp->matches(log_));
......
......@@ -35,7 +35,6 @@
using namespace isc::dns;
using namespace std;
using boost::shared_ptr;
using namespace isc::dns::rdata;
namespace isc {
......@@ -874,7 +873,7 @@ namespace {
/// for next time.
class DatabaseIterator : public ZoneIterator {
public:
DatabaseIterator(shared_ptr<DatabaseAccessor> accessor,
DatabaseIterator(boost::shared_ptr<DatabaseAccessor> accessor,
const Name& zone_name,
const RRClass& rrclass,
bool separate_rrs) :
......@@ -970,7 +969,7 @@ private:
}
// The dedicated accessor
shared_ptr<DatabaseAccessor> accessor_;
boost::shared_ptr<DatabaseAccessor> accessor_;
// The context
DatabaseAccessor::IteratorContextPtr context_;
// Class of the zone
......@@ -1006,7 +1005,7 @@ DatabaseClient::getIterator(const isc::dns::Name& name,
//
class DatabaseUpdater : public ZoneUpdater {
public:
DatabaseUpdater(shared_ptr<DatabaseAccessor> accessor, int zone_id,
DatabaseUpdater(boost::shared_ptr<DatabaseAccessor> accessor, int zone_id,
const Name& zone_name, const RRClass& zone_class,
bool journaling) :
committed_(false), accessor_(accessor), zone_id_(zone_id),
......@@ -1052,7 +1051,7 @@ private:
typedef DatabaseAccessor Accessor;
bool committed_;
shared_ptr<DatabaseAccessor> accessor_;
boost::shared_ptr<DatabaseAccessor> accessor_;
const int zone_id_;
const string db_name_;
const string zone_name_;
......@@ -1229,7 +1228,7 @@ DatabaseClient::getUpdater(const isc::dns::Name& name, bool replace,
isc_throw(isc::BadValue, "Can't store journal and replace the whole "
"zone at the same time");
}
shared_ptr<DatabaseAccessor> update_accessor(accessor_->clone());
boost::shared_ptr<DatabaseAccessor> update_accessor(accessor_->clone());
const std::pair<bool, int> zone(update_accessor->startUpdateZone(
name.toText(), replace));
if (!zone.first) {
......@@ -1249,7 +1248,7 @@ private:
// A shortcut typedef to keep the code concise.
typedef DatabaseAccessor Accessor;
public:
DatabaseJournalReader(shared_ptr<Accessor> accessor, const Name& zone,
DatabaseJournalReader(boost::shared_ptr<Accessor> accessor, const Name& zone,
int zone_id, const RRClass& rrclass, uint32_t begin,
uint32_t end) :
accessor_(accessor), zone_(zone), rrclass_(rrclass),
......@@ -1297,7 +1296,7 @@ public:
}
private:
shared_ptr<Accessor> accessor_;
boost::shared_ptr<Accessor> accessor_;
const Name zone_;
const RRClass rrclass_;
Accessor::IteratorContextPtr context_;
......@@ -1312,7 +1311,7 @@ DatabaseClient::getJournalReader(const isc::dns::Name& zone,
uint32_t begin_serial,
uint32_t end_serial) const
{
shared_ptr<DatabaseAccessor> jnl_accessor(accessor_->clone());
boost::shared_ptr<DatabaseAccessor> jnl_accessor(accessor_->clone());
const pair<bool, int> zoneinfo(jnl_accessor->getZone(zone.toText()));
if (!zoneinfo.first) {
return (pair<ZoneJournalReader::Result, ZoneJournalReaderPtr>(
......
......@@ -41,7 +41,6 @@ using namespace isc::datasrc;
using namespace std;
// don't import the entire boost namespace. It will unexpectedly hide uint32_t
// for some systems.
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::lexical_cast;
using namespace isc::dns;
......@@ -229,9 +228,9 @@ public:
}
}
virtual shared_ptr<DatabaseAccessor> clone() {
virtual boost::shared_ptr<DatabaseAccessor> clone() {
// This accessor is stateless, so we can simply return a new instance.
return (shared_ptr<DatabaseAccessor>(new NopAccessor));
return (boost::shared_ptr<DatabaseAccessor>(new NopAccessor));
}
virtual std::pair<bool, int> startUpdateZone(const std::string&, bool) {
......@@ -350,8 +349,8 @@ public:
fillData();
}
virtual shared_ptr<DatabaseAccessor> clone() {
shared_ptr<MockAccessor> cloned_accessor(new MockAccessor());
virtual boost::shared_ptr<DatabaseAccessor> clone() {
boost::shared_ptr<MockAccessor> cloned_accessor(new MockAccessor());
cloned_accessor->readonly_records_ = &readonly_records_master_;
cloned_accessor->update_records_ = &update_records_master_;
cloned_accessor->empty_records_ = &empty_records_master_;
......@@ -706,7 +705,7 @@ public:
}
// This allows the test code to get the accessor used in an update context
shared_ptr<const MockAccessor> getLatestClone() const {
boost::shared_ptr<const MockAccessor> getLatestClone() const {
return (latest_clone_);
}
......@@ -992,7 +991,7 @@ public:
current_accessor_ = new ACCESSOR_TYPE();
is_mock_ = (dynamic_cast<MockAccessor*>(current_accessor_) != NULL);
client_.reset(new DatabaseClient(qclass_,
shared_ptr<ACCESSOR_TYPE>(
boost::shared_ptr<ACCESSOR_TYPE>(
current_accessor_)));
}
......@@ -1002,9 +1001,9 @@ public:
*/
void checkZoneFinder(const DataSourceClient::FindResult& zone) {
ASSERT_NE(ZoneFinderPtr(), zone.zone_finder) << "No zone finder";
shared_ptr<DatabaseClient::Finder> finder(
boost::shared_ptr<DatabaseClient::Finder> finder(
dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
ASSERT_NE(shared_ptr<DatabaseClient::Finder>(), finder) <<
ASSERT_NE(boost::shared_ptr<DatabaseClient::Finder>(), finder) <<
"Wrong type of finder";
if (is_mock_) {
EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
......@@ -1012,10 +1011,10 @@ public:
EXPECT_EQ(current_accessor_, &finder->getAccessor());
}
shared_ptr<DatabaseClient::Finder> getFinder() {
boost::shared_ptr<DatabaseClient::Finder> getFinder() {
DataSourceClient::FindResult zone(client_->findZone(zname_));
EXPECT_EQ(result::SUCCESS, zone.code);
shared_ptr<DatabaseClient::Finder> finder(
boost::shared_ptr<DatabaseClient::Finder> finder(
dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
if (is_mock_) {
EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
......@@ -1102,11 +1101,11 @@ public:
// Will be deleted by client_, just keep the current value for comparison.
ACCESSOR_TYPE* current_accessor_;
shared_ptr<DatabaseClient> client_;
boost::shared_ptr<DatabaseClient> client_;
const std::string database_name_;
// The zone finder of the test zone commonly used in various tests.
shared_ptr<DatabaseClient::Finder> finder_;
boost::shared_ptr<DatabaseClient::Finder> finder_;
// Some shortcut variables for commonly used test parameters
const Name zname_; // the zone name stored in the test data source
......@@ -1120,7 +1119,7 @@ public:
// update related objects to be tested
ZoneUpdaterPtr updater_;
shared_ptr<const DatabaseAccessor> update_accessor_;
boost::shared_ptr<const DatabaseAccessor> update_accessor_;
// placeholders
const std::vector<std::string> empty_rdatas_; // for NXRRSET/NXDOMAIN
......@@ -1194,7 +1193,7 @@ TEST(GenericDatabaseClientTest, noAccessorException) {
// We need a dummy variable here; some compiler would regard it a mere
// declaration instead of an instantiation and make the test fail.
EXPECT_THROW(DatabaseClient dummy(RRClass::IN(),
shared_ptr<DatabaseAccessor>()),
boost::shared_ptr<DatabaseAccessor>()),
isc::InvalidParameter);
}
......@@ -1215,7 +1214,8 @@ TEST(GenericDatabaseClientTest, noZoneNotImplementedIterator) {
}
TEST(GenericDatabaseClientTest, notImplementedIterator) {
EXPECT_THROW(DatabaseClient(RRClass::IN(), shared_ptr<DatabaseAccessor>(
EXPECT_THROW(DatabaseClient(RRClass::IN(),
boost::shared_ptr<DatabaseAccessor>(
new NopAccessor())).getIterator(Name("example.org")),
isc::NotImplemented);
}
......@@ -1499,7 +1499,7 @@ TEST_F(MockDatabaseClientTest, ttldiff_separate_rrs) {
}
TYPED_TEST(DatabaseClientTest, find) {
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->expected_rdatas_.clear();
this->expected_sig_rdatas_.clear();
......@@ -1738,7 +1738,7 @@ TYPED_TEST(DatabaseClientTest, find) {
}
TYPED_TEST(DatabaseClientTest, findDelegation) {
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
// The apex should not be considered delegation point and we can access
// data
......@@ -1856,7 +1856,7 @@ TYPED_TEST(DatabaseClientTest, findDelegation) {
}
TYPED_TEST(DatabaseClientTest, emptyDomain) {
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
// This domain doesn't exist, but a subdomain of it does.
// Therefore we should pretend the domain is there, but contains no RRsets
......@@ -1868,7 +1868,7 @@ TYPED_TEST(DatabaseClientTest, emptyDomain) {
// Glue-OK mode. Just go through NS delegations down (but not through
// DNAME) and pretend it is not there.
TYPED_TEST(DatabaseClientTest, glueOK) {
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->expected_rdatas_.clear();
this->expected_sig_rdatas_.clear();
......@@ -1925,7 +1925,7 @@ TYPED_TEST(DatabaseClientTest, glueOK) {
}
TYPED_TEST(DatabaseClientTest, wildcard) {
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
// First, simple wildcard match
// Check also that the RRSIG is added from the wildcard (not modified)
......@@ -2098,7 +2098,7 @@ TYPED_TEST(DatabaseClientTest, wildcard) {
TYPED_TEST(DatabaseClientTest, noWildcard) {
// Tests with the NO_WILDCARD flag.
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
// This would match *.wild.example.org, but with NO_WILDCARD should
// result in NXDOMAIN.
......@@ -2159,7 +2159,7 @@ TYPED_TEST(DatabaseClientTest, noWildcard) {
TYPED_TEST(DatabaseClientTest, NXRRSET_NSEC) {
// The domain exists, but doesn't have this RRType
// So we should get its NSEC
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->expected_rdatas_.push_back("www2.example.org. A AAAA NSEC RRSIG");
this->expected_sig_rdatas_.push_back("NSEC 5 3 3600 20000101000000 "
......@@ -2178,7 +2178,7 @@ TYPED_TEST(DatabaseClientTest, wildcardNXRRSET_NSEC) {
//
// The user will have to query us again to get the correct
// answer (eg. prove there's not an exact match)
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->expected_rdatas_.push_back("cancel.here.wild.example.org. A NSEC "
"RRSIG");
......@@ -2195,7 +2195,7 @@ TYPED_TEST(DatabaseClientTest, wildcardNXRRSET_NSEC) {
TYPED_TEST(DatabaseClientTest, NXDOMAIN_NSEC) {
// The domain doesn't exist, so we must get the right NSEC
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->expected_rdatas_.push_back("www2.example.org. A AAAA NSEC RRSIG");
this->expected_sig_rdatas_.push_back("NSEC 5 3 3600 20000101000000 "
......@@ -2232,7 +2232,7 @@ TYPED_TEST(DatabaseClientTest, NXDOMAIN_NSEC) {
TYPED_TEST(DatabaseClientTest, emptyNonterminalNSEC) {
// Same as NXDOMAIN_NSEC, but with empty non-terminal
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->expected_rdatas_.push_back("empty.nonterminal.example.org. NSEC");
doFindTest(*finder, isc::dns::Name("nonterminal.example.org."),
......@@ -2259,7 +2259,7 @@ TYPED_TEST(DatabaseClientTest, getOrigin) {
DataSourceClient::FindResult
zone(this->client_->findZone(Name("example.org")));
ASSERT_EQ(result::SUCCESS, zone.code);
shared_ptr<DatabaseClient::Finder> finder(
boost::shared_ptr<DatabaseClient::Finder> finder(
dynamic_pointer_cast<DatabaseClient::Finder>(zone.zone_finder));
if (this->is_mock_) {
EXPECT_EQ(READONLY_ZONE_ID, finder->zone_id());
......@@ -2301,7 +2301,7 @@ TYPED_TEST(DatabaseClientTest, updaterFinder) {
TYPED_TEST(DatabaseClientTest, flushZone) {
// A simple update case: flush the entire zone
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
// Before update, the name exists.
EXPECT_EQ(ZoneFinder::SUCCESS, finder->find(this->qname_,
......@@ -2420,7 +2420,7 @@ TYPED_TEST(DatabaseClientTest, addRRsetToNewZone) {
TYPED_TEST(DatabaseClientTest, addRRsetToCurrentZone) {
// Similar to the previous test, but not replacing the existing data.
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->updater_ = this->client_->getUpdater(this->zname_, false);
this->updater_->addRRset(*this->rrset_);
......@@ -2577,7 +2577,7 @@ TYPED_TEST(DatabaseClientTest, addRRsetWithRRSIG) {
}
TYPED_TEST(DatabaseClientTest, deleteRRset) {
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->rrset_.reset(new RRset(this->qname_, this->qclass_, this->qtype_,
this->rrttl_));
......@@ -2849,7 +2849,7 @@ TYPED_TEST(DatabaseClientTest, compoundUpdate) {
// Commit the changes, confirm the entire changes applied.
this->updater_->commit();
shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
boost::shared_ptr<DatabaseClient::Finder> finder(this->getFinder());
this->expected_rdatas_.clear();
this->expected_rdatas_.push_back("192.0.2.2");
this->expected_rdatas_.push_back("192.0.2.1");
......@@ -2865,7