Browse Source

[2211] use DataSrcClientsMgr in the remote config handler for data_sources.

JINMEI Tatuya 12 years ago
parent
commit
15a048bef5
3 changed files with 2 additions and 16 deletions
  1. 0 1
      src/bin/auth/auth_srv.cc
  2. 0 1
      src/bin/auth/command.cc
  3. 2 14
      src/bin/auth/main.cc

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

@@ -26,7 +26,6 @@
 #include <exceptions/exceptions.h>
 
 #include <util/buffer.h>
-#include <util/threads/sync.h>
 
 #include <dns/edns.h>
 #include <dns/exceptions.h>

+ 0 - 1
src/bin/auth/command.cc

@@ -22,7 +22,6 @@
 #include <config/ccsession.h>
 #include <exceptions/exceptions.h>
 #include <dns/rrclass.h>
-#include <util/threads/sync.h>
 
 #include <string>
 

+ 2 - 14
src/bin/auth/main.cc

@@ -18,7 +18,6 @@
 
 #include <util/buffer.h>
 #include <util/io/socketsession.h>
-#include <util/threads/sync.h>
 
 #include <dns/message.h>
 #include <dns/messagerenderer.h>
@@ -104,23 +103,12 @@ datasrcConfigHandler(AuthSrv* server, bool* first_time,
             // Further updates will work the usual way.
             assert(config_session != NULL);
             *first_time = false;
-            lists = configureDataSource(
+            server->getDataSrcClientsMgr().reconfigure(
                 config_session->getRemoteConfigValue("data_sources",
                                                      "classes"));
         } else {
-            lists = configureDataSource(config->get("classes"));
+            server->getDataSrcClientsMgr().reconfigure(config->get("classes"));
         }
-
-        // Replace the server's lists.  The returned lists will be stored
-        // in a local variable 'lists', and will be destroyed outside of
-        // the temporary block for the lock scope.  That way we can minimize
-        // the range of the critical section.
-        {
-            isc::util::thread::Mutex::Locker locker(
-                server->getDataSrcClientListMutex());
-            lists = server->swapDataSrcClientLists(lists);
-        }
-        // The previous lists are destroyed here.
     }
 }