]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2211] (unrelated fix) make sure the first time config is installed
authorJINMEI Tatuya <jinmei@isc.org>
Sat, 20 Oct 2012 06:59:59 +0000 (23:59 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Sat, 20 Oct 2012 06:59:59 +0000 (23:59 -0700)
it's a topic of #2363, but the change is small and is better to be fixed
here because it would cause conflict.

src/bin/auth/main.cc

index 8f92c1c7124c1043f1eba545e4871b831268fb6a..1fe0f481a242117a800e1c6ebbb75ceb3dae1d06 100644 (file)
@@ -101,21 +101,16 @@ datasrcConfigHandler(AuthSrv* server, bool* first_time,
     // bother to catch them; the exception would be propagated to the
     // top level of the server and terminate it.
 
-    if (config->contains("classes")) {
-        isc::datasrc::DataSrcClientListsPtr lists;
-
-        if (*first_time) {
-            // HACK: The default is not passed to the handler in the first
-            // callback. This one will get the default (or, current value).
-            // Further updates will work the usual way.
-            assert(config_session != NULL);
-            *first_time = false;
-            server->getDataSrcClientsMgr().reconfigure(
-                config_session->getRemoteConfigValue("data_sources",
-                                                     "classes"));
-        } else {
-            server->getDataSrcClientsMgr().reconfigure(config->get("classes"));
-        }
+    if (*first_time) {
+        // HACK: The default is not passed to the handler in the first
+        // callback. This one will get the default (or, current value).
+        // Further updates will work the usual way.
+        assert(config_session != NULL);
+        *first_time = false;
+        server->getDataSrcClientsMgr().reconfigure(
+            config_session->getRemoteConfigValue("data_sources", "classes"));
+    } else if (config->contains("classes")) {
+        server->getDataSrcClientsMgr().reconfigure(config->get("classes"));
     }
 }