Module: check_mk
Branch: master
Commit: 42fea50588426da4b1c30c00da2ae6b3f342444a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42fea50588426d…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Sep 7 15:55:17 2016 +0200
windows agent: fixed two issues when parsing the check_mk configuration
---
agents/windows/types.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/agents/windows/types.cc b/agents/windows/types.cc
index db2fdf6..fde408d 100644
--- a/agents/windows/types.cc
+++ b/agents/windows/types.cc
@@ -119,7 +119,7 @@ mrpe_entry *from_string<mrpe_entry *>(const std::string
&value) {
template <>
winperf_counter *from_string<winperf_counter *>(const std::string &value) {
size_t colonIdx = value.find_last_of(":");
- if (colonIdx != std::string::npos) {
+ if (colonIdx == std::string::npos) {
fprintf(stderr,
"Invalid counter '%s' in section [winperf]: need number(or
"
"text) and colon, e.g. 238:processor.\n",
@@ -198,7 +198,7 @@ eventlog_config_entry from_string<eventlog_config_entry>(
}
}
- return eventlog_config_entry(level, hide_context ? 1 : 0, nullptr, false);
+ return eventlog_config_entry(level, hide_context ? 1 : 0, "", false);
}
const char *level_name(int level_id) {