Module: check_mk
Branch: master
Commit: 0e2985752703c4880d3c14c0b332841c2342a105
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0e2985752703c4…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Thu Mar 15 15:08:58 2018 +0100
Win-agent: remove dead code
The member variable _realtime_support in class Section was never used.
---
agents/windows/Section.cc | 5 -----
agents/windows/Section.h | 6 +-----
agents/windows/SectionManager.cc | 7 +++----
agents/windows/build_version | 2 +-
4 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/agents/windows/Section.cc b/agents/windows/Section.cc
index c863a2a..1f6c4d5 100644
--- a/agents/windows/Section.cc
+++ b/agents/windows/Section.cc
@@ -62,11 +62,6 @@ Section::Section(const std::string &outputName, const std::string
&configName,
, _show_header(show_header)
, _separator(separator) {}
-Section *Section::withRealtimeSupport() {
- _realtime_support = true;
- return this;
-}
-
bool Section::produceOutput(std::ostream &out,
const std::optional<std::string> &remoteIP,
bool nested) {
diff --git a/agents/windows/Section.h b/agents/windows/Section.h
index 62ad087..c9ff16f 100644
--- a/agents/windows/Section.h
+++ b/agents/windows/Section.h
@@ -54,8 +54,6 @@ public:
virtual ~Section() = default;
- Section *withRealtimeSupport();
-
virtual void postprocessConfig() {}
/// TODO please implement me
@@ -66,9 +64,8 @@ public:
* used by the section. The caller will give the threads a chance
* to complete
**/
- virtual std::vector<HANDLE> stopAsync() { return std::vector<HANDLE>();
}
+ virtual std::vector<HANDLE> stopAsync() { return {}; }
virtual bool isEnabled() const { return true; }
- virtual bool realtimeSupport() const { return _realtime_support; }
bool produceOutput(std::ostream &out,
const std::optional<std::string> &remoteIP,
@@ -92,7 +89,6 @@ protected:
private:
const bool _show_header;
const char _separator;
- bool _realtime_support{false};
};
#endif // Section_h
diff --git a/agents/windows/SectionManager.cc b/agents/windows/SectionManager.cc
index 489267d..739f74a 100644
--- a/agents/windows/SectionManager.cc
+++ b/agents/windows/SectionManager.cc
@@ -132,9 +132,9 @@ void SectionManager::loadStaticSections(Configuration &config,
addSection(new SectionCheckMK(config, only_from, _script_statistics,
_logger, _winapi));
addSection(new SectionUptime(_env, _logger, _winapi));
- addSection((new SectionDF(_env, _logger, _winapi))->withRealtimeSupport());
+ addSection((new SectionDF(_env, _logger, _winapi)));
addSection(new SectionPS(config, _logger, _winapi));
- addSection((new SectionMem(_env, _logger, _winapi))->withRealtimeSupport());
+ addSection((new SectionMem(_env, _logger, _winapi)));
addSection(new SectionFileinfo(config, _logger, _winapi));
addSection(new SectionServices(_env, _logger, _winapi));
@@ -143,8 +143,7 @@ void SectionManager::loadStaticSections(Configuration &config,
addSection(
(new SectionWinperf("phydisk", _env, _logger,
_winapi))->withBase(234));
addSection((new SectionWinperf("processor", _env, _logger, _winapi))
- ->withBase(238)
- ->withRealtimeSupport());
+ ->withBase(238));
addSection(new SectionEventlog(config, _logger, _winapi));
addSection(new SectionLogwatch(config, _logger, _winapi));
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 38c07f5..babf97e 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3176
+3178