Module: check_mk
Branch: master
Commit: 972d9adc33b33609c33dc0e132f11fe452bc7af3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=972d9adc33b336…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri May 13 09:29:38 2016 +0200
Fetched Livestatus from downstream.
---
livestatus/src/AttributelistColumn.cc | 6 +++---
livestatus/src/HostFileColumn.cc | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/livestatus/src/AttributelistColumn.cc
b/livestatus/src/AttributelistColumn.cc
index 937d1d7..c98782f 100644
--- a/livestatus/src/AttributelistColumn.cc
+++ b/livestatus/src/AttributelistColumn.cc
@@ -75,11 +75,11 @@ void AttributelistColumn::output(void *data, Query *query) {
if (_show_list) {
unsigned i = 0;
bool first = true;
- query->outputBeginSublist();
+ query->outputBeginList();
while (al_entries[i].name != nullptr) {
if ((mask & al_entries[i].bitvalue) != 0u) {
if (!first) {
- query->outputSublistSeparator();
+ query->outputListSeparator();
} else {
first = false;
}
@@ -87,7 +87,7 @@ void AttributelistColumn::output(void *data, Query *query) {
}
i++;
}
- query->outputEndSublist();
+ query->outputEndList();
} else {
query->outputUnsignedLong(mask);
}
diff --git a/livestatus/src/HostFileColumn.cc b/livestatus/src/HostFileColumn.cc
index ff92349..feb5be0 100644
--- a/livestatus/src/HostFileColumn.cc
+++ b/livestatus/src/HostFileColumn.cc
@@ -66,7 +66,11 @@ unique_ptr<vector<char>> HostFileColumn::getBlob(void
*data) {
string path = _base_dir + "/" + host_name + _suffix;
int fd = open(path.c_str(), O_RDONLY);
if (fd < 0) {
- logger(LG_WARN, "Cannot open %s: %s", path.c_str(), strerror(errno));
+ // It is OK when inventory/logwatch files do not exist.
+ if (errno != ENOENT) {
+ logger(LG_WARN, "Cannot open %s: %s", path.c_str(),
+ strerror(errno));
+ }
return nullptr;
}