Module: check_mk
Branch: master
Commit: 14cdc9639383250f0dd707ed67e9dda0adc1814f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14cdc963938325…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Feb 25 16:03:55 2019 +0100
Tiny simplification.
Change-Id: Ieebecb4113b23f433267738592ee746ff2a2ca78
---
livestatus/src/LogEntry.h | 1 +
livestatus/src/TableStateHistory.cc | 14 ++------------
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/livestatus/src/LogEntry.h b/livestatus/src/LogEntry.h
index a35f209..3edb0d2 100644
--- a/livestatus/src/LogEntry.h
+++ b/livestatus/src/LogEntry.h
@@ -121,6 +121,7 @@ public:
std::string _plugin_output;
std::string _comment;
+ // NOTE: The following four fields contain only derived information.
host *_host;
service *_service;
const contact *_contact;
diff --git a/livestatus/src/TableStateHistory.cc b/livestatus/src/TableStateHistory.cc
index 34e05a0..732c3d8 100644
--- a/livestatus/src/TableStateHistory.cc
+++ b/livestatus/src/TableStateHistory.cc
@@ -423,18 +423,8 @@ void TableStateHistory::answerQuery(Query *query) {
state->_is_host = entry->_service_description.empty();
state->_host = entry->_host;
state->_service = entry->_service;
-#ifdef CMC
- state->_host_name = entry->_host->name();
- state->_service_description = entry->_service == nullptr
- ? ""
- : entry->_service->name();
-#else
- state->_host_name = entry->_host->name;
- state->_service_description =
- entry->_service == nullptr
- ? ""
- : entry->_service->description;
-#endif
+ state->_host_name = entry->_host_name;
+ state->_service_description = entry->_service_description;
// No state found. Now check if this host/services is
// filtered out. Note: we currently do not filter out hosts