Module: check_mk
Branch: master
Commit: 29a9f8d0c71aee9159609b4ae7723cde8abc5a85
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=29a9f8d0c71aeeā¦
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Mar 8 11:36:40 2017 +0100
Ensure that a list is always rendered, well, as a list. :-)
Change-Id: I3be63fe0d9f916906a9e84cd50782ed3c8bf23d3
---
livestatus/src/AttributeListColumn.cc | 2 +-
livestatus/src/LogwatchListColumn.cc | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/livestatus/src/AttributeListColumn.cc
b/livestatus/src/AttributeListColumn.cc
index 3481631..f778ced 100644
--- a/livestatus/src/AttributeListColumn.cc
+++ b/livestatus/src/AttributeListColumn.cc
@@ -69,8 +69,8 @@ int32_t AttributeListColumn::getValue(void *row, contact * /*unused*/)
{
void AttributeListColumn::output(void *row, RowRenderer &r,
contact * /* auth_user */) {
- modified_atttibutes values(getValue(row, nullptr));
ListRenderer l(r);
+ modified_atttibutes values(getValue(row, nullptr));
for (const auto &entry : known_attributes) {
if (values[entry.second]) {
l.output(entry.first);
diff --git a/livestatus/src/LogwatchListColumn.cc b/livestatus/src/LogwatchListColumn.cc
index bf3c7d1..9e84564 100644
--- a/livestatus/src/LogwatchListColumn.cc
+++ b/livestatus/src/LogwatchListColumn.cc
@@ -37,6 +37,8 @@ using std::string;
void LogwatchListColumn::output(void *row, RowRenderer &r,
contact * /* auth_user */) {
+ ListRenderer l(r);
+
#ifdef CMC
auto hst = rowData<Host>(row);
if (hst == nullptr) {
@@ -51,7 +53,6 @@ void LogwatchListColumn::output(void *row, RowRenderer &r,
string host_name = hst->name;
#endif
- ListRenderer l(r);
if (!_logwatch_path.empty()) {
try {
for (const auto &entry : fs::directory_iterator(