Browse Source

[master] Merged trac5186 (config-test vs unregister timers)

Francis Dupont 8 years ago
parent
commit
c48f99bb4c
2 changed files with 6 additions and 2 deletions
  1. 3 1
      src/bin/dhcp4/json_config_parser.cc
  2. 3 1
      src/bin/dhcp6/json_config_parser.cc

+ 3 - 1
src/bin/dhcp4/json_config_parser.cc

@@ -413,7 +413,9 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set,
     Subnet::resetSubnetID();
 
     // Remove any existing timers.
-    TimerMgr::instance()->unregisterTimers();
+    if (!check_only) {
+        TimerMgr::instance()->unregisterTimers();
+    }
 
     // Revert any runtime option definitions configured so far and not committed.
     LibDHCP::revertRuntimeOptionDefs();

+ 3 - 1
src/bin/dhcp6/json_config_parser.cc

@@ -608,7 +608,9 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set,
     Subnet::resetSubnetID();
 
     // Remove any existing timers.
-    TimerMgr::instance()->unregisterTimers();
+    if (!check_only) {
+        TimerMgr::instance()->unregisterTimers();
+    }
 
     // Revert any runtime option definitions configured so far and not committed.
     LibDHCP::revertRuntimeOptionDefs();