Module: check_mk
Branch: master
Commit: 557e4e48928967266b6101de1fd5b7bd4e1eeedc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=557e4e48928967…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 2 18:24:50 2013 +0200
Support legacy mistypes log message intitial states
---
livestatus/src/LogEntry.cc | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/livestatus/src/LogEntry.cc b/livestatus/src/LogEntry.cc
index 1744bab..1ef92e2 100644
--- a/livestatus/src/LogEntry.cc
+++ b/livestatus/src/LogEntry.cc
@@ -4,23 +4,24 @@
// | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
// | | |___| | | | __/ (__| < | | | | . \ |
// | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+// | |_____| |
+// | __ __ _ ____ |
+// | | \/ (_) ___ _ __ ___ / ___|___ _ __ ___ |
+// | | |\/| | |/ __| '__/ _ \ | | / _ \| '__/ _ \ |
+// | | | | | | (__| | | (_) | | |__| (_) | | | __/ |
+// | |_| |_|_|\___|_| \___/ \____\___/|_| \___| |
// | |
// | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
// +------------------------------------------------------------------+
//
-// This file is part of Check_MK.
-// The official homepage is at
http://mathias-kettner.de/check_mk.
+// This file is part of the Check_MK Micro Core. Copyright by Mathias
+// Kettner, Preysingstr. 74, 81667 München, Germany. All rights are
+// reserved. You may *not* redistribute or modify this software unless
+// you have a written permission of the owner. This file is *not*
+// available under GNU GPL. If you do not like this then please use a
+// different monitoring core.
//
-// check_mk is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation in version 2. check_mk is distributed
-// in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
-// out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-// PARTICULAR PURPOSE. See the GNU General Public License for more de-
-// ails. You should have received a copy of the GNU General Public
-// License along with GNU Make; see the file COPYING. If not, write
-// to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-// Boston, MA 02110-1301 USA.
+// Please note: This software is experimental. Use at your own risk.
#include <string.h>
#include <time.h>
@@ -323,13 +324,17 @@ inline bool LogEntry::handleExternalCommandEntry()
return false;
}
-inline bool LogEntry::handleTextEntry() {
- if (!strncmp(_text, "LOG VERSION: 2.0", 16)){
+inline bool LogEntry::handleTextEntry()
+{
+ if (!strncmp(_text, "LOG VERSION: 2.0", 16))
+ {
_logclass = LOGCLASS_PROGRAM;
_type = LOG_VERSION;
return true;
}
- else if (!strncmp(_text, "logging initial states", 22)){
+ else if (!strncmp(_text, "logging initial states", 22)
+ || !strncmp(_text, "logging intitial states", 23))
+ {
_logclass = LOGCLASS_PROGRAM;
_type = LOG_INITIAL_STATES;
return true;