]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5031] Hooks parser now detects if hooksmgr failed to load libraries.
authorTomek Mrugalski <tomasz@isc.org>
Thu, 12 Jan 2017 11:51:48 +0000 (12:51 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 12 Jan 2017 11:51:48 +0000 (12:51 +0100)
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dhcpsrv/parsers/dhcp_parsers.h

index e3cc9d9c58777faf45633c97c675e07ec44a4957..f0d0b74d5f00fc1e0506f3ec625d049d199b3af6 100644 (file)
@@ -357,7 +357,9 @@ HooksLibrariesParser::loadLibraries() {
     /// the list of libraries has changed.
     /// @todo: Delete any stored CalloutHandles before reloading the
     /// libraries
-    HooksManager::loadLibraries(libraries_);
+    if (!HooksManager::loadLibraries(libraries_)) {
+        isc_throw(DhcpConfigError, "One or more hook libraries failed to load");
+    }
 }
 
 // Method for testing
index 36e53eae378670eace677426040fdf2f699cffba..c047f95977b9f0e425200b958072fedcf15daf06 100644 (file)
@@ -496,10 +496,13 @@ public:
 
     /// @brief Commits hooks libraries data
     ///
-    /// This method calls necessary methods in HooksManager that will load the
-    /// actual libraries. Providing that the specified libraries are valid and are different
-    /// to those already loaded, this method loads the new set of libraries
-    /// (and unloads the existing set).
+    /// This method calls necessary methods in HooksManager that will unload
+    /// any libraries that may be currently loaded and will load the actual
+    /// libraries. Providing that the specified libraries are valid and are
+    /// different to those already loaded, this method loads the new set of
+    /// libraries (and unloads the existing set).
+    ///
+    /// @throw DhcpConfigError if the call to HooksManager fails.
     void loadLibraries();
 
     /// @brief Returns list of parsed libraries