[svn] commit: r2555 - in /branches/trac221b/src/bin/auth: auth_srv.cc auth_srv.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jul 21 00:46:26 UTC 2010
Author: jinmei
Date: Wed Jul 21 00:46:26 2010
New Revision: 2555
Log:
- renamed a variable: s/is_axfr_connection_established/xfrout_connected/ as suggested in review
- commented on how a customized AbstractXfroutClient object is used
Modified:
branches/trac221b/src/bin/auth/auth_srv.cc
branches/trac221b/src/bin/auth/auth_srv.h
Modified: branches/trac221b/src/bin/auth/auth_srv.cc
==============================================================================
--- branches/trac221b/src/bin/auth/auth_srv.cc (original)
+++ branches/trac221b/src/bin/auth/auth_srv.cc Wed Jul 21 00:46:26 2010
@@ -92,7 +92,7 @@
AbstractSession* xfrin_session_;
- bool is_axfr_connection_established_;
+ bool xfrout_connected_;
AbstractXfroutClient& xfrout_client_;
/// Currently non-configurable, but will be.
@@ -106,7 +106,7 @@
AbstractXfroutClient& xfrout_client) :
config_session_(NULL), verbose_mode_(false),
xfrin_session_(NULL),
- is_axfr_connection_established_(false),
+ xfrout_connected_(false),
xfrout_client_(xfrout_client)
{
// cur_datasrc_ is automatically initialized by the default constructor,
@@ -121,9 +121,9 @@
}
AuthSrvImpl::~AuthSrvImpl() {
- if (is_axfr_connection_established_) {
+ if (xfrout_connected_) {
xfrout_client_.disconnect();
- is_axfr_connection_established_ = false;
+ xfrout_connected_ = false;
}
}
@@ -347,22 +347,22 @@
}
try {
- if (!is_axfr_connection_established_) {
+ if (!xfrout_connected_) {
xfrout_client_.connect();
- is_axfr_connection_established_ = true;
+ xfrout_connected_ = true;
}
xfrout_client_.sendXfroutRequestInfo(
io_message.getSocket().getNative(),
io_message.getData(),
io_message.getDataSize());
} catch (const XfroutError& err) {
- if (is_axfr_connection_established_) {
+ if (xfrout_connected_) {
// discoonect() may trigger an exception, but since we try it
// only if we've successfully opened it, it shouldn't happen in
// normal condition. Should this occur, we'll propagate it to the
// upper layer.
xfrout_client_.disconnect();
- is_axfr_connection_established_ = false;
+ xfrout_connected_ = false;
}
if (verbose_mode_) {
Modified: branches/trac221b/src/bin/auth/auth_srv.h
==============================================================================
--- branches/trac221b/src/bin/auth/auth_srv.h (original)
+++ branches/trac221b/src/bin/auth/auth_srv.h Wed Jul 21 00:46:26 2010
@@ -51,6 +51,13 @@
AuthSrv(const AuthSrv& source);
AuthSrv& operator=(const AuthSrv& source);
public:
+ /// The constructor.
+ ///
+ /// \param use_cache Whether to enable hot spot cache for lookup results.
+ /// \param xfrout_client Communication interface with a separate xfrout
+ /// process. It's normally a reference to an xfr::XfroutClient object,
+ /// but can refer to a local mock object for testing (or other
+ /// experimental) purposes.
AuthSrv(const bool use_cache,
isc::xfr::AbstractXfroutClient& xfrout_client);
~AuthSrv();
More information about the bind10-changes
mailing list