[svn] commit: r2920 - /branches/trac191-rebased/src/bin/auth/main.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Sep 14 15:54:23 UTC 2010
Author: naokikambe
Date: Tue Sep 14 15:54:22 2010
New Revision: 2920
Log:
add ad-hoc implement for query counters in the auth module for the stats module
But it may bring worse performance to the auth module. It must be more considered.
trac #191 .
Modified:
branches/trac191-rebased/src/bin/auth/main.cc
Modified: branches/trac191-rebased/src/bin/auth/main.cc
==============================================================================
--- branches/trac191-rebased/src/bin/auth/main.cc (original)
+++ branches/trac191-rebased/src/bin/auth/main.cc Tue Sep 14 15:54:22 2010
@@ -154,7 +154,9 @@
// XXX: we should eventually pass io_service here.
Session* cc_session = NULL;
Session* xfrin_session = NULL;
+ Session* stats_session = NULL;
bool xfrin_session_established = false; // XXX (see Trac #287)
+ bool stats_session_established = false;
ModuleCCSession* config_session = NULL;
string xfrout_socket_path;
if (getenv("B10_FROM_BUILD") != NULL) {
@@ -209,12 +211,19 @@
xfrin_session_established = true;
cout << "[b10-auth] Xfrin session channel established." << endl;
+ stats_session = new Session(io_service->get_io_service());
+ cout << "[b10-auth] Stats session channel created." << endl;
+ stats_session->establish(NULL);
+ stats_session_established = true;
+ cout << "[b10-auth] Stats session channel established." << endl;
+
// XXX: with the current interface to asio_link we have to create
// auth_server before io_service while Session needs io_service.
// In a next step of refactoring we should make asio_link independent
// from auth_server, and create io_service, auth_server, and
// sessions in that order.
auth_server->setXfrinSession(xfrin_session);
+ auth_server->setStatsSession(stats_session);
auth_server->setConfigSession(config_session);
auth_server->updateConfig(ElementPtr());
@@ -229,7 +238,12 @@
xfrin_session->disconnect();
}
+ if (stats_session_established) {
+ stats_session->disconnect();
+ }
+
delete xfrin_session;
+ delete stats_session;
delete config_session;
delete cc_session;
delete io_service;
More information about the bind10-changes
mailing list