Browse Source

[2211] moved DataSrcClientsMgr object from main to auth_srv

this way we can avoid having a situtation that it's NULL.
JINMEI Tatuya 12 years ago
parent
commit
77d522cf9e
2 changed files with 3 additions and 4 deletions
  1. 3 0
      src/bin/auth/auth_srv.cc
  2. 0 4
      src/bin/auth/main.cc

+ 3 - 0
src/bin/auth/auth_srv.cc

@@ -53,6 +53,7 @@
 #include <auth/query.h>
 #include <auth/query.h>
 #include <auth/statistics.h>
 #include <auth/statistics.h>
 #include <auth/auth_log.h>
 #include <auth/auth_log.h>
+#include <auth/datasrc_clients_mgr.h>
 
 
 #include <boost/bind.hpp>
 #include <boost/bind.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/lexical_cast.hpp>
@@ -328,6 +329,8 @@ private:
     bool validateStatistics(isc::data::ConstElementPtr data) const;
     bool validateStatistics(isc::data::ConstElementPtr data) const;
 
 
     auth::Query query_;
     auth::Query query_;
+
+    auth::DataSrcClientsMgr datasrc_clients_mgr_;
 };
 };
 
 
 AuthSrvImpl::AuthSrvImpl(AbstractXfroutClient& xfrout_client,
 AuthSrvImpl::AuthSrvImpl(AbstractXfroutClient& xfrout_client,

+ 0 - 4
src/bin/auth/main.cc

@@ -232,10 +232,6 @@ main(int argc, char* argv[]) {
         isc::server_common::initKeyring(*config_session);
         isc::server_common::initKeyring(*config_session);
         auth_server->setTSIGKeyRing(&isc::server_common::keyring);
         auth_server->setTSIGKeyRing(&isc::server_common::keyring);
 
 
-        // Instantiate the data source clients manager.  At the moment
-        // just so we actually create it in system tests.
-        DataSrcClientsMgr datasrc_clients_mgr;
-
         // Start the data source configuration.  We pass first_time and
         // Start the data source configuration.  We pass first_time and
         // config_session for the hack described in datasrcConfigHandler.
         // config_session for the hack described in datasrcConfigHandler.
         bool first_time = true;
         bool first_time = true;