]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1174] Fixed compilation failures for dhcp4/dhcp6
authorTomek Mrugalski <tomek@isc.org>
Tue, 14 Jul 2020 13:36:47 +0000 (15:36 +0200)
committerTomek Mrugalski <tomek@isc.org>
Tue, 14 Jul 2020 13:37:51 +0000 (15:37 +0200)
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/tests/config_parser_unittest.cc

index e754293e13325a8dcfd0dfde9d880c5ee6247034..79d2a03ea4ad14a83eba884734cb7cab26fe5885 100644 (file)
@@ -676,7 +676,7 @@ ControlledDhcpv4Srv::commandStatisticSetMaxSampleAgeAllHandler(const string&,
     ConstElementPtr answer = stats_mgr.statisticSetMaxSampleAgeAllHandler(args);
     // Update the default parameter.
     auto duration = stats_mgr.getMaxSampleAgeDefault();
-    long max_age = duration.total_seconds();
+    long max_age = duration.count(); // do we need to check if this is in seconds?
     CfgMgr::instance().getCurrentCfg()->addConfiguredGlobal(
         "statistic-default-sample-age", Element::create(max_age));
     return (answer);
index 8153f34b09a7815d498c0876b8d2eca392c0c10a..a3ea61658868c7a7d4fee8d30a10ec37e91fdde3 100644 (file)
@@ -31,7 +31,7 @@
 #include <hooks/hooks_manager.h>
 #include <stats/stats_mgr.h>
 #include <testutils/log_utils.h>
-#include <util/boost_time_utils.h>
+#include <util/chrono_time_utils.h>
 #include <util/doubles.h>
 
 #include "marker_file.h"
index 50c39e9b68a6ae8f7c0e402a53ef8cb67dc66fe7..64b0b81abb95f1a3df2075183b76e68137c9d7b6 100644 (file)
@@ -679,7 +679,7 @@ ControlledDhcpv6Srv::commandStatisticSetMaxSampleAgeAllHandler(const string&,
     ConstElementPtr answer = stats_mgr.statisticSetMaxSampleAgeAllHandler(args);
     // Update the default parameter.
     auto duration = stats_mgr.getMaxSampleAgeDefault();
-    long max_age = duration.total_seconds();
+    long max_age = duration.count(); /// @todo: do we need to check if this is in seconds?
     CfgMgr::instance().getCurrentCfg()->addConfiguredGlobal(
         "statistic-default-sample-age", Element::create(max_age));
     return (answer);
index 47e2cad81c33f9407bbe00d5f60af0b0a8ecd68a..b171d589847020e4f614a21df5548ca0675cfce0 100644 (file)
@@ -30,7 +30,7 @@
 #include <process/config_ctl_info.h>
 #include <stats/stats_mgr.h>
 #include <testutils/log_utils.h>
-#include <util/boost_time_utils.h>
+#include <util/chrono_time_utils.h>
 
 #include "test_data_files_config.h"
 #include "test_libraries.h"