[svn] commit: r1267 - in /trunk/src/bin/auth: auth_srv.cc auth_srv.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Mar 10 07:28:44 UTC 2010
Author: jinmei
Date: Wed Mar 10 07:28:44 2010
New Revision: 1267
Log:
cleanup: hid details to the implementation class, and avoided including
an unnecessary header file
Modified:
trunk/src/bin/auth/auth_srv.cc
trunk/src/bin/auth/auth_srv.h
Modified: trunk/src/bin/auth/auth_srv.cc
==============================================================================
--- trunk/src/bin/auth/auth_srv.cc (original)
+++ trunk/src/bin/auth/auth_srv.cc Wed Mar 10 07:28:44 2010
@@ -64,6 +64,10 @@
AuthSrvImpl();
std::string db_file_;
isc::auth::MetaDataSrc data_sources_;
+ /// We keep a pointer to the currently running sqlite datasource
+ /// so that we can specifically remove that one should the database
+ /// file change
+ isc::auth::ConstDataSrcPtr cur_datasrc_;
};
AuthSrvImpl::AuthSrvImpl() {
@@ -74,7 +78,7 @@
// set empty (sqlite) data source, once ccsession is up
// the datasource will be set by the configuration setting
// (or the default one if none is set)
- cur_datasrc_ = ConstDataSrcPtr();
+ impl_->cur_datasrc_ = ConstDataSrcPtr();
// add static data source
impl_->data_sources_.addDataSrc(ConstDataSrcPtr(new StaticDataSrc));
}
@@ -143,13 +147,13 @@
Sqlite3DataSrc* sd = new Sqlite3DataSrc;
sd->init(config);
- if (cur_datasrc_) {
- impl_->data_sources_.removeDataSrc(cur_datasrc_);
+ if (impl_->cur_datasrc_) {
+ impl_->data_sources_.removeDataSrc(impl_->cur_datasrc_);
}
ConstDataSrcPtr csd = ConstDataSrcPtr(sd);
impl_->data_sources_.addDataSrc(csd);
- cur_datasrc_ = csd;
+ impl_->cur_datasrc_ = csd;
return isc::config::createAnswer(0);
} catch (isc::Exception error) {
@@ -170,7 +174,7 @@
}
// if we have no sqlite3 data source, use the default
- if (!cur_datasrc_) {
+ if (impl_->cur_datasrc_ == NULL) {
setDbFile(ElementPtr());
}
Modified: trunk/src/bin/auth/auth_srv.h
==============================================================================
--- trunk/src/bin/auth/auth_srv.h (original)
+++ trunk/src/bin/auth/auth_srv.h Wed Mar 10 07:28:44 2010
@@ -20,7 +20,6 @@
#include <string>
#include <cc/data.h>
-#include <auth/data_source.h>
namespace isc {
namespace dns {
@@ -55,10 +54,6 @@
isc::data::ElementPtr updateConfig(isc::data::ElementPtr config);
private:
AuthSrvImpl* impl_;
- /// We keep a pointer to the currently running sqlite datasource
- /// so that we can specifically remove that one should the database
- /// file change
- isc::auth::ConstDataSrcPtr cur_datasrc_;
};
#endif // __AUTH_SRV_H
More information about the bind10-changes
mailing list