From: Marcin Siodelski Date: Thu, 22 Jan 2015 15:31:04 +0000 (+0100) Subject: [3664] Minor changes as a result of the review. X-Git-Tag: trac3712_base~38^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca04fa118463493c32522169dedaae3308f656d5;p=thirdparty%2Fkea.git [3664] Minor changes as a result of the review. - Fixed identation in configure.ac - Added kea-lfc to Doxygen - Corrected some little typos in the kea-lfc man page - Removed unnecessary headers and libraries - lfc.h updated - one comment, one method made const - added anonymous namespace for lfc_controller_unittests.cc --- diff --git a/configure.ac b/configure.ac index b49136501a..6ddd3f6dbe 100644 --- a/configure.ac +++ b/configure.ac @@ -1393,8 +1393,8 @@ AC_CONFIG_FILES([compatcheck/Makefile src/bin/keactrl/keactrl.conf src/bin/keactrl/tests/Makefile src/bin/keactrl/tests/keactrl_tests.sh - src/bin/lfc/Makefile - src/bin/lfc/tests/Makefile + src/bin/lfc/Makefile + src/bin/lfc/tests/Makefile src/bin/perfdhcp/Makefile src/bin/perfdhcp/tests/Makefile src/bin/perfdhcp/tests/testdata/Makefile diff --git a/doc/Doxyfile b/doc/Doxyfile index a78375eef1..b27ce0eb31 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -650,6 +650,7 @@ INPUT = ../src/bin/d2 \ ../src/bin/dhcp6 \ ../src/bin/perfdhcp \ ../src/bin/sockcreator \ + ../src/bin/lfc \ ../src/hooks/dhcp/user_chk \ ../src/lib/asiolink \ ../src/lib/cc \ diff --git a/src/bin/lfc/Makefile.am b/src/bin/lfc/Makefile.am index c2926f6f39..0b30b18167 100644 --- a/src/bin/lfc/Makefile.am +++ b/src/bin/lfc/Makefile.am @@ -60,15 +60,9 @@ kea_lfc_SOURCES = main.cc kea_lfc_LDADD = liblfc.la kea_lfc_LDADD += $(top_builddir)/src/lib/log/libkea-log.la kea_lfc_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la -kea_lfc_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la -kea_lfc_LDADD += $(top_builddir)/src/lib/asiodns/libkea-asiodns.la kea_lfc_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la -kea_lfc_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la -kea_lfc_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la kea_lfc_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la kea_lfc_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la -kea_lfc_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la kea_lfc_LDADD += $(top_builddir)/src/lib/util/libkea-util.la -kea_lfc_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la kea_lfcdir = $(pkgdatadir) diff --git a/src/bin/lfc/kea-lfc.xml b/src/bin/lfc/kea-lfc.xml index 5473c3cec5..67c40b4724 100644 --- a/src/bin/lfc/kea-lfc.xml +++ b/src/bin/lfc/kea-lfc.xml @@ -61,7 +61,7 @@ The kea-lfc service process removes redundant information for the files used to provide persistent storage for - the memfile data base back end. The service is written to run as + the memfile data base backend. The service is written to run as a stand alone process. While it can be started externally it should be started by the Kea DHCP servers as desired and required. @@ -123,7 +123,7 @@ - Input or copy of lease file - Before the DHCP serves invokes LFC it will move + Input or copy of lease file - Before the DHCP server invokes LFC it will move the current lease file to this file and then call LFC with the new file. @@ -145,14 +145,6 @@ this file to previous lease file. - - - - - - - - diff --git a/src/bin/lfc/lfc.cc b/src/bin/lfc/lfc.cc index f8e3b450e4..8fc26d0f24 100644 --- a/src/bin/lfc/lfc.cc +++ b/src/bin/lfc/lfc.cc @@ -14,8 +14,6 @@ #include #include -#include -#include #include #include diff --git a/src/bin/lfc/lfc.h b/src/bin/lfc/lfc.h index ec79f7a187..a85bb96fd5 100644 --- a/src/bin/lfc/lfc.h +++ b/src/bin/lfc/lfc.h @@ -50,12 +50,12 @@ public: /// @brief Acts as the primary entry point to start execution /// of the process. Provides the control logic: /// - /// 1. parse command line arguments - /// 2. verifies that it is the only instance - /// 3. creates pid file (TBD) - /// .... TBD - /// 4. remove pid file (TBD) - /// 5. exit to the caller + /// -# parse command line arguments + /// -# verifies that it is the only instance + /// -# creates pid file (TBD) + /// -# .... TBD + /// -# remove pid file (TBD) + /// -# exit to the caller void launch(int argc, char* argv[], const bool test_mode); /// @brief Process the command line arguments. It is the first @@ -80,7 +80,7 @@ public: /// @brief Gets the protocol version of the leaes files /// /// @return Returns the value of the protocol version - int getProtocolVersion() { + int getProtocolVersion() const { return (protocol_version_); } @@ -137,7 +137,7 @@ private: std::string pid_file_; }; -}; // namespace isc:lfc +}; // namespace isc::lfc }; // namespace isc #endif diff --git a/src/bin/lfc/tests/Makefile.am b/src/bin/lfc/tests/Makefile.am index 23ea485887..9e799a2d81 100644 --- a/src/bin/lfc/tests/Makefile.am +++ b/src/bin/lfc/tests/Makefile.am @@ -53,17 +53,10 @@ lfc_unittests_LDADD = $(GTEST_LDADD) lfc_unittests_LDADD += $(top_builddir)/src/bin/lfc/liblfc.la lfc_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la lfc_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la -lfc_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libkea-asiodns.la lfc_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la -lfc_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la -lfc_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la -lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la -lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/testutils/libdhcpsrvtest.la -lfc_unittests_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la lfc_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la -lfc_unittests_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la endif diff --git a/src/bin/lfc/tests/lfc_controller_unittests.cc b/src/bin/lfc/tests/lfc_controller_unittests.cc index 76753dbb9c..de5f0f91f8 100644 --- a/src/bin/lfc/tests/lfc_controller_unittests.cc +++ b/src/bin/lfc/tests/lfc_controller_unittests.cc @@ -13,12 +13,13 @@ // PERFORMANCE OF THIS SOFTWARE. #include -#include #include using namespace isc::lfc; using namespace std; +namespace { + TEST(lfcControllerTest, initialValues) { lfcController lfcController; @@ -154,3 +155,5 @@ TEST(lfcControllerTest, someBadData) { EXPECT_THROW(lfcController.parseArgs(argc, argv), InvalidUsage); } + +} // end of anonymous namespace