mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#3315] addressed review comments
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <asiolink/io_service_mgr.h>
|
||||
#include <cc/command_interpreter.h>
|
||||
#include <config/command_mgr.h>
|
||||
#include <database/dbaccess_parser.h>
|
||||
@@ -879,6 +880,7 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
|
||||
// change causes problems when trying to roll back.
|
||||
HooksManager::prepareUnloadLibraries();
|
||||
static_cast<void>(HooksManager::unloadLibraries());
|
||||
IOServiceMgr::instance().clearIOServices();
|
||||
const HooksConfig& libraries =
|
||||
CfgMgr::instance().getStagingCfg()->getHooksConfig();
|
||||
bool multi_threading_enabled = true;
|
||||
@@ -934,6 +936,16 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
|
||||
if (notify_libraries) {
|
||||
return (notify_libraries);
|
||||
}
|
||||
|
||||
/// Let postponed hook initializations to run.
|
||||
try {
|
||||
IOServiceMgr::instance().pollIOServices();
|
||||
} catch (const std::exception& ex) {
|
||||
std::ostringstream err;
|
||||
err << "Error initializing hooks: "
|
||||
<< ex.what();
|
||||
return (isc::config::createAnswer(CONTROL_RESULT_ERROR, err.str()));
|
||||
}
|
||||
}
|
||||
|
||||
return (answer);
|
||||
|
Reference in New Issue
Block a user