]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2211] moved DataSrcClientsMgr object from main to auth_srv
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 19 Oct 2012 22:07:32 +0000 (15:07 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 19 Oct 2012 22:07:32 +0000 (15:07 -0700)
this way we can avoid having a situtation that it's NULL.

src/bin/auth/auth_srv.cc
src/bin/auth/main.cc

index 917ef48689c65a93d37cd3cce2baba75ebac8e3d..10861c13a0b835b5fcc17ce14947c54a8eb44b24 100644 (file)
@@ -53,6 +53,7 @@
 #include <auth/query.h>
 #include <auth/statistics.h>
 #include <auth/auth_log.h>
+#include <auth/datasrc_clients_mgr.h>
 
 #include <boost/bind.hpp>
 #include <boost/lexical_cast.hpp>
@@ -328,6 +329,8 @@ private:
     bool validateStatistics(isc::data::ConstElementPtr data) const;
 
     auth::Query query_;
+
+    auth::DataSrcClientsMgr datasrc_clients_mgr_;
 };
 
 AuthSrvImpl::AuthSrvImpl(AbstractXfroutClient& xfrout_client,
index 47131b1bd3e94f05576a9f39e375bae5bfce78a7..84c7de4159d7e029ec95df2b696a718a58701ae5 100644 (file)
@@ -232,10 +232,6 @@ main(int argc, char* argv[]) {
         isc::server_common::initKeyring(*config_session);
         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
         // config_session for the hack described in datasrcConfigHandler.
         bool first_time = true;