From: Tomek Mrugalski Date: Fri, 15 Dec 2017 14:54:31 +0000 (+0100) Subject: [5389] References to spec_config.h removed. X-Git-Tag: trac5404_base~1^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a57876d82a0bc1f28097844e01214f26303afa28;p=thirdparty%2Fkea.git [5389] References to spec_config.h removed. --- diff --git a/src/bin/d2/d2_controller.cc b/src/bin/d2/d2_controller.cc index a830722af3..d86857db09 100644 --- a/src/bin/d2/d2_controller.cc +++ b/src/bin/d2/d2_controller.cc @@ -9,7 +9,6 @@ #include #include #include -#include #include @@ -45,14 +44,6 @@ DProcessBase* D2Controller::createProcess() { D2Controller::D2Controller() : DControllerBase(d2_app_name_, d2_bin_name_) { - // set the spec file either from the environment or - // use the production value. - if (getenv("KEA_FROM_BUILD")) { - setSpecFileName(std::string(getenv("KEA_FROM_BUILD")) + - "/src/bin/d2/dhcp-ddns.spec"); - } else { - setSpecFileName(D2_SPECFILE_LOCATION); - } } isc::data::ConstElementPtr diff --git a/src/bin/d2/tests/d2_controller_unittests.cc b/src/bin/d2/tests/d2_controller_unittests.cc index 856a88a7c5..1f09d330a0 100644 --- a/src/bin/d2/tests/d2_controller_unittests.cc +++ b/src/bin/d2/tests/d2_controller_unittests.cc @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -95,9 +94,6 @@ TEST_F(D2ControllerTest, basicInstanceTesting) { // Verify that controller's bin name is correct. EXPECT_TRUE(checkBinName(D2Controller::d2_bin_name_)); - // Verify that controller's spec file name is correct. - EXPECT_TRUE(checkSpecFileName(D2_SPECFILE_LOCATION)); - // Verify that controller's IOService exists. EXPECT_TRUE(checkIOService()); diff --git a/src/lib/process/d_controller.cc b/src/lib/process/d_controller.cc index 6f31a83fe8..10eb43574e 100644 --- a/src/lib/process/d_controller.cc +++ b/src/lib/process/d_controller.cc @@ -39,7 +39,7 @@ DControllerBasePtr DControllerBase::controller_; // Note that the constructor instantiates the controller's primary IOService. DControllerBase::DControllerBase(const char* app_name, const char* bin_name) : app_name_(app_name), bin_name_(bin_name), - verbose_(false), check_only_(false), spec_file_name_(""), + verbose_(false), check_only_(false), io_service_(new isc::asiolink::IOService()), io_signal_queue_() { } diff --git a/src/lib/process/d_controller.h b/src/lib/process/d_controller.h index 4d781331c5..e5de1aa7c5 100644 --- a/src/lib/process/d_controller.h +++ b/src/lib/process/d_controller.h @@ -413,21 +413,6 @@ protected: return (io_service_); } - /// @brief Getter for fetching the name of the controller's config spec - /// file. - /// - /// @return returns the file name string. - const std::string getSpecFileName() const { - return (spec_file_name_); - } - - /// @brief Setter for setting the name of the controller's config spec file. - /// - /// @param spec_file_name the file name string. - void setSpecFileName(const std::string& spec_file_name) { - spec_file_name_ = spec_file_name; - } - /// @brief Static getter which returns the singleton instance. /// /// @return returns a pointer reference to the private singleton instance @@ -614,9 +599,6 @@ private: /// is enabled (usually specified by the command line -t argument). bool check_only_; - /// @brief The absolute file name of the JSON spec file. - std::string spec_file_name_; - /// @brief Pointer to the instance of the process. /// /// This is required for config and command handlers to gain access to diff --git a/src/lib/process/spec_config.h.pre.in b/src/lib/process/spec_config.h.pre.in deleted file mode 100644 index 41a7addba0..0000000000 --- a/src/lib/process/spec_config.h.pre.in +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC") -// -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#define D2_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/dhcp-ddns.spec" diff --git a/src/lib/process/tests/d_controller_unittests.cc b/src/lib/process/tests/d_controller_unittests.cc index d8b7697772..72f24ee116 100644 --- a/src/lib/process/tests/d_controller_unittests.cc +++ b/src/lib/process/tests/d_controller_unittests.cc @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -52,9 +51,6 @@ TEST_F(DStubControllerTest, basicInstanceTesting) { // Verify that controller's bin name is correct. EXPECT_TRUE(checkBinName(DStubController::stub_bin_name_)); - // Verify that controller's spec file name is correct. - EXPECT_TRUE(checkSpecFileName(D2_SPECFILE_LOCATION)); - // Verify that controller's IOService exists. EXPECT_TRUE(checkIOService()); diff --git a/src/lib/process/testutils/d_test_stubs.cc b/src/lib/process/testutils/d_test_stubs.cc index b73f6346ef..8da62fb981 100644 --- a/src/lib/process/testutils/d_test_stubs.cc +++ b/src/lib/process/testutils/d_test_stubs.cc @@ -7,7 +7,6 @@ #include #include #include -#include #include #include @@ -103,13 +102,6 @@ DStubController::instance() { DStubController::DStubController() : DControllerBase(stub_app_name_, stub_bin_name_), processed_signals_(), record_signal_only_(false), use_alternate_parser_(false) { - - if (getenv("KEA_FROM_BUILD")) { - setSpecFileName(std::string(getenv("KEA_FROM_BUILD")) + - "/src/bin/d2/dhcp-ddns.spec"); - } else { - setSpecFileName(D2_SPECFILE_LOCATION); - } } bool diff --git a/src/lib/process/testutils/d_test_stubs.h b/src/lib/process/testutils/d_test_stubs.h index 6cc5b9aaae..c30695eaea 100644 --- a/src/lib/process/testutils/d_test_stubs.h +++ b/src/lib/process/testutils/d_test_stubs.h @@ -384,16 +384,6 @@ public: return (getController()->getBinName().compare(should_be) == 0); } - /// @brief Returns true if the Controller's spec file name matches the - /// given value. - /// - /// @param should_be is the value to compare against. - /// - /// @return returns true if the values are equal. - bool checkSpecFileName(const std::string& should_be) { - return (getController()->getSpecFileName().compare(should_be) == 0); - } - /// @brief Tests the existence of the Controller's application process. /// /// @return returns true if the process instance exists.