From: Marcin Siodelski Date: Tue, 20 Jan 2015 11:03:54 +0000 (+0100) Subject: [3668] Further changes after second review. X-Git-Tag: trac3712_base~63^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9fa33438f7078db91e6e537c7f9da73df8f418dd;p=thirdparty%2Fkea.git [3668] Further changes after second review. - Pass io_service to D2Process as a const reference - Fix issues in memfile unittest --- diff --git a/src/bin/d2/d2_process.cc b/src/bin/d2/d2_process.cc index 73e10fb458..e8c9942dfb 100644 --- a/src/bin/d2/d2_process.cc +++ b/src/bin/d2/d2_process.cc @@ -26,7 +26,7 @@ namespace d2 { // be configurable. const unsigned int D2Process::QUEUE_RESTART_PERCENT = 80; -D2Process::D2Process(const char* name, asiolink::IOServicePtr io_service) +D2Process::D2Process(const char* name, const asiolink::IOServicePtr& io_service) : DProcessBase(name, io_service, DCfgMgrBasePtr(new D2CfgMgr())), reconf_queue_flag_(false), shutdown_type_(SD_NORMAL) { diff --git a/src/bin/d2/d2_process.h b/src/bin/d2/d2_process.h index fa624ddb52..d94022b11d 100644 --- a/src/bin/d2/d2_process.h +++ b/src/bin/d2/d2_process.h @@ -66,7 +66,7 @@ public: /// asynchronous event handling. /// /// @throw DProcessBaseError is io_service is NULL. - D2Process(const char* name, asiolink::IOServicePtr io_service); + D2Process(const char* name, const asiolink::IOServicePtr& io_service); /// @brief Called after instantiation to perform initialization unique to /// D2. diff --git a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc index 22c8072bf8..713702d2c7 100644 --- a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc @@ -335,7 +335,7 @@ TEST_F(MemfileLeaseMgrTest, lfcTimerDisabled) { // at which the IOService must be executed to run the handlers // for the installed timers. TEST_F(MemfileLeaseMgrTest, getIOServiceExecInterval) { - LeaseMgr::ParameterMap pmap; + LeaseMgr::ParameterMap pmap; pmap["type"] = "memfile"; pmap["universe"] = "4"; pmap["name"] = getLeaseFilePath("leasefile4_0.csv"); @@ -345,14 +345,14 @@ TEST_F(MemfileLeaseMgrTest, getIOServiceExecInterval) { EXPECT_EQ(0, lease_mgr->getIOServiceExecInterval()); // lfc-interval = 10 - pmap["lfc-interval"] = 10; + pmap["lfc-interval"] = "10"; lease_mgr.reset(new LFCMemfileLeaseMgr(pmap)); EXPECT_EQ(10, lease_mgr->getIOServiceExecInterval()); // lfc-interval = 20 - pmap["lfc-interval"] = 20; + pmap["lfc-interval"] = "20"; lease_mgr.reset(new LFCMemfileLeaseMgr(pmap)); - EXPECT_EQ(10, lease_mgr->getIOServiceExecInterval()); + EXPECT_EQ(20, lease_mgr->getIOServiceExecInterval()); }