// data source types, and should eventually be improved.
// Currently memory data source for class IN is the only possibility.
server_.setInMemoryClient(RRClass::IN(),
- isc::datasrc::DataSourceClientContainerPtr());
+ isc::datasrc::DataSourceClientContainerPtr());
BOOST_FOREACH(boost::shared_ptr<AuthConfigParser> datasrc_config,
datasources_) {
}
bool
-AuthSrv::hasInMemoryClient() {
+AuthSrv::hasInMemoryClient() const {
return (impl_->memory_client_container_ !=
isc::datasrc::DataSourceClientContainerPtr());
}
void
AuthSrv::setInMemoryClient(const isc::dns::RRClass& rrclass,
- isc::datasrc::DataSourceClientContainerPtr memory_client)
+ DataSourceClientContainerPtr memory_client)
{
if (rrclass != impl_->memory_client_class_) {
isc_throw(InvalidParameter,
/// multi-data-source framework is completed.
///
/// \return True if the in-memory datasource has been set.
- bool hasInMemoryClient();
+ bool hasInMemoryClient() const;
/// Sets or replaces the in-memory data source of the specified RR class.
///
}
private:
- isc::datasrc::DataSourceClientContainerPtr real_client_ptr_;
+ const isc::datasrc::DataSourceClientContainerPtr real_client_ptr_;
ThrowWhen throw_when_;
bool isc_exception_;
ConstRRsetPtr fake_rrset_;
}
private:
- isc::datasrc::DataSourceClient* client_;
+ isc::datasrc::DataSourceClient* const client_;
};
} // end anonymous namespace for throwing proxy classes
"Config for memory backend does not contain a '"
+name+
"' value");
- return false;
+ return (false);
} else if (!config->get(name) ||
config->get(name)->getType() != Element::string) {
addError(errors, "value of " + name +
" in memory backend config is not a string");
- return false;
+ return (false);
} else {
- return true;
+ return (true);
}
}
// checked by the caller
void
applyConfig(isc::datasrc::InMemoryClient* client,
- isc::data::ConstElementPtr config_value) {
+ isc::data::ConstElementPtr config_value)
+{
ConstElementPtr zones_config = config_value->get("zones");
if (!zones_config) {
// XXX: Like the RR class, we cannot retrieve the default value here,
try {
client = new isc::datasrc::InMemoryClient();
applyConfig(client, config);
- return client;
- } catch (isc::Exception& isce) {
+ return (client);
+ } catch (const isc::Exception& isce) {
delete client;
error = isce.what();
return (NULL);