diff options
Diffstat (limited to 'src/bin/auth/main.cc')
-rw-r--r-- | src/bin/auth/main.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bin/auth/main.cc b/src/bin/auth/main.cc index fa11521898..5a720637ef 100644 --- a/src/bin/auth/main.cc +++ b/src/bin/auth/main.cc @@ -73,7 +73,7 @@ namespace { /* need global var for config/command handlers. * todo: turn this around, and put handlers in the authserver * class itself? */ -AuthSrv *auth_server; +AuthSrv* auth_server; ConstElementPtr my_config_handler(ConstElementPtr new_config) { @@ -87,12 +87,13 @@ my_command_handler(const string& command, ConstElementPtr args) { } void -datasrcConfigHandler(DataSourceConfigurator* configurator, const std::string&, - isc::data::ConstElementPtr config, +datasrcConfigHandler(AuthSrv* server, DataSourceConfigurator* configurator, + const std::string&, isc::data::ConstElementPtr config, const isc::config::ConfigData&) { + assert(server != NULL); if (config->contains("classes")) { - configurator->reconfigure(config->get("classes")); + configurator->reconfigure(*server, config->get("classes")); } } @@ -206,9 +207,10 @@ main(int argc, char* argv[]) { auth_server->setTSIGKeyRing(&isc::server_common::keyring); // Start the data source configuration - datasrc_configurator.reset(new DataSourceConfigurator(auth_server)); + datasrc_configurator.reset(new DataSourceConfigurator); config_session->addRemoteConfig("data_sources", boost::bind(datasrcConfigHandler, + auth_server, datasrc_configurator.get(), _1, _2, _3), false); @@ -217,6 +219,7 @@ main(int argc, char* argv[]) { // get the default (or, current value). Further updates will work // the usual way. datasrc_configurator->reconfigure( + *auth_server, config_session->getRemoteConfigValue("data_sources", "classes")); // Now start asynchronous read. |