]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Moved loadLibrarie() at the end
authorFrancis Dupont <fdupont@isc.org>
Fri, 24 Feb 2017 13:38:21 +0000 (14:38 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 24 Feb 2017 13:38:21 +0000 (14:38 +0100)
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp6/json_config_parser.cc

index 9f1f4dab905553c70b75940212c00027b69a2487..46dfbd65dfe32e70ad5390eba5195d86ca0df5d5 100644 (file)
@@ -628,15 +628,15 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set,
             // No need to commit interface names as this is handled by the
             // CfgMgr::commit() function.
 
-            // This occurs last as if it succeeds, there is no easy way
-            // revert it.  As a result, the failure to commit a subsequent
-            // change causes problems when trying to roll back.
-            hooks_parser.loadLibraries();
-
             // Apply the staged D2ClientConfig, used to be done by parser commit
             D2ClientConfigPtr cfg;
             cfg = CfgMgr::instance().getStagingCfg()->getD2ClientConfig();
             CfgMgr::instance().setD2ClientConfig(cfg);
+
+            // This occurs last as if it succeeds, there is no easy way
+            // revert it.  As a result, the failure to commit a subsequent
+            // change causes problems when trying to roll back.
+            hooks_parser.loadLibraries();
         }
         catch (const isc::Exception& ex) {
             LOG_ERROR(dhcp4_logger, DHCP4_PARSER_COMMIT_FAIL).arg(ex.what());
index 52740668a6e2922f65715860af3bc446480d364f..96b7460ccabb8e282c47f9949d080b6db445df61 100644 (file)
@@ -851,15 +851,15 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set,
             // No need to commit interface names as this is handled by the
             // CfgMgr::commit() function.
 
-            // This occurs last as if it succeeds, there is no easy way to
-            // revert it.  As a result, the failure to commit a subsequent
-            // change causes problems when trying to roll back.
-            hooks_parser.loadLibraries();
-
             // Apply staged D2ClientConfig, used to be done by parser commit
             D2ClientConfigPtr cfg;
             cfg = CfgMgr::instance().getStagingCfg()->getD2ClientConfig();
             CfgMgr::instance().setD2ClientConfig(cfg);
+
+            // This occurs last as if it succeeds, there is no easy way to
+            // revert it.  As a result, the failure to commit a subsequent
+            // change causes problems when trying to roll back.
+            hooks_parser.loadLibraries();
         }
         catch (const isc::Exception& ex) {
             LOG_ERROR(dhcp6_logger, DHCP6_PARSER_COMMIT_FAIL).arg(ex.what());