Module: check_mk
Branch: master
Commit: 4567c5d6b83b89a182acce090645e707db78eb39
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4567c5d6b83b89…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Oct 4 15:13:51 2013 +0200
livestatus table statehist: fixed rubbish entries whenever
---
ChangeLog | 2 ++
livestatus/src/TableStateHistory.cc | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5624601..ca7b650 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1.2.3i3:
Core:
* FIX: fixed typo in core startup message "logging initial states"
+ * FIX: livestatus table statehist: fixed rubbish entries whenever
+ logfile instances got unloaded
Notifications:
* mkeventd: new notification plugin for forwarding notifications
diff --git a/livestatus/src/TableStateHistory.cc b/livestatus/src/TableStateHistory.cc
index 74228c9..af6c2ae 100644
--- a/livestatus/src/TableStateHistory.cc
+++ b/livestatus/src/TableStateHistory.cc
@@ -453,8 +453,13 @@ void TableStateHistory::answerQuery(Query *query)
state->_is_host = entry->_svc_desc == 0;
state->_host = entry->_host;
state->_service = entry->_service;
- state->_host_name = entry->_host_name;
- state->_service_description = entry->_svc_desc != 0 ?
entry->_svc_desc : "";
+ #ifdef CMC
+ state->_host_name = entry->_host->name();
+ state->_service_description = entry->_service != 0 ?
entry->_service->name() : "";
+ #else
+ state->_host_name = entry->_host->name;
+ state->_service_description = entry->_service != 0 ?
entry->_service->description : "";
+ #endif
// No state found. Now check if this host/services is filtered out.
// Note: we currently do not filter out hosts since they might be