BIND 10 trac3080, updated. c0a4d644ecd7f473add91b295befac1206f58e76 [3080] A few additional minor review corrections.
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Apr 2 11:23:56 UTC 2014
The branch, trac3080 has been updated
via c0a4d644ecd7f473add91b295befac1206f58e76 (commit)
from 08def0873c7495a1bf56c2028c3bd15cc8b93e20 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c0a4d644ecd7f473add91b295befac1206f58e76
Author: Thomas Markwalder <tmark at isc.org>
Date: Wed Apr 2 07:23:16 2014 -0400
[3080] A few additional minor review corrections.
PgSqlLeaseMgr::openDatabase now sets conn_ to NULL after calling PQfinish.
PgSqlLeaseMgr constructor, moved member inits to the initializer list
Fixed exception text.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dhcpsrv/pgsql_lease_mgr.cc | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dhcpsrv/pgsql_lease_mgr.cc b/src/lib/dhcpsrv/pgsql_lease_mgr.cc
index d3a5a02..953b560 100644
--- a/src/lib/dhcpsrv/pgsql_lease_mgr.cc
+++ b/src/lib/dhcpsrv/pgsql_lease_mgr.cc
@@ -280,9 +280,9 @@ public:
if (!lease_->hwaddr_.empty()) {
if (lease->hwaddr_.size() > HWAddr::MAX_HWADDR_LEN) {
isc_throw(DbOperationError,
- "Attempted to store Hardware address longer ("
+ "Hardware address length : "
<< lease->hwaddr_.size()
- << " than allowed maximum of "
+ << " exceeds maximum allowed of: "
<< HWAddr::MAX_HWADDR_LEN);
}
@@ -569,13 +569,10 @@ private:
};
PgSqlLeaseMgr::PgSqlLeaseMgr(const LeaseMgr::ParameterMap& parameters)
- : LeaseMgr(parameters) {
- conn_ = NULL;
+ : LeaseMgr(parameters), exchange4_(new PgSqlLease4Exchange()),
+ exchange6_(new PgSqlLease6Exchange()), conn_(NULL) {
openDatabase();
prepareStatements();
-
- exchange4_.reset(new PgSqlLease4Exchange());
- exchange6_.reset(new PgSqlLease6Exchange());
}
PgSqlLeaseMgr::~PgSqlLeaseMgr() {
@@ -590,6 +587,7 @@ PgSqlLeaseMgr::~PgSqlLeaseMgr() {
PQclear(r);
PQfinish(conn_);
+ conn_ = NULL;
}
}
@@ -665,6 +663,7 @@ PgSqlLeaseMgr::openDatabase() {
// to release it, but grab the error message first.
std::string error_message = PQerrorMessage(conn_);
PQfinish(conn_);
+ conn_ = NULL;
isc_throw(DbOpenError, error_message);
}
}
More information about the bind10-changes
mailing list