Module: check_mk
Branch: master
Commit: d32f4daaf846d59bf645de8c40d8d0fb9a2f15c4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d32f4daaf846d5…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Oct 23 13:55:53 2015 +0200
Fixed incorrect usage of 'inline'.
---
livestatus/src/HostlistStateColumn.cc | 2 +-
livestatus/src/LogEntry.cc | 16 ++++++++--------
livestatus/src/Logfile.cc | 2 +-
livestatus/src/TableStateHistory.cc | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/livestatus/src/HostlistStateColumn.cc
b/livestatus/src/HostlistStateColumn.cc
index 60558d4..087d5b6 100644
--- a/livestatus/src/HostlistStateColumn.cc
+++ b/livestatus/src/HostlistStateColumn.cc
@@ -31,7 +31,7 @@
extern TableServices *g_table_hosts;
-inline bool hst_state_is_worse(int32_t state1, int32_t state2)
+static inline bool hst_state_is_worse(int32_t state1, int32_t state2)
{
if (state1 == 0) return false; // UP is worse than nothing
else if (state2 == 0) return true; // everything else is worse then UP
diff --git a/livestatus/src/LogEntry.cc b/livestatus/src/LogEntry.cc
index 015decf..c1f5dce 100644
--- a/livestatus/src/LogEntry.cc
+++ b/livestatus/src/LogEntry.cc
@@ -92,7 +92,7 @@ LogEntry::~LogEntry()
-inline bool LogEntry::handleStatusEntry()
+bool LogEntry::handleStatusEntry()
{
//// TODO: check if its worth of implementing
//// Most lines are status entries anyway...
@@ -276,7 +276,7 @@ inline bool LogEntry::handleStatusEntry()
// HOST NOTIFICATION: omdadmin;localhost;check-mk-notify;DOWNTIMESTOPPED (UP);mk
// HOST NOTIFICATION: omdadmin;localhost;CUSTOM (UP);check-mk-notify;OK - 127.0.0.1: rta
0.055ms, lost 0%;omdadmin;TEST
// HOST NOTIFICATION: omdadmin;localhost;DOWN;check-mk-notify;Manually set to Down by
omdadmin
-inline bool LogEntry::handleNotificationEntry()
+bool LogEntry::handleNotificationEntry()
{
if (!strncmp(_text, "HOST NOTIFICATION: ", 19)
|| !strncmp(_text, "SERVICE NOTIFICATION: ", 22))
@@ -321,7 +321,7 @@ inline bool LogEntry::handleNotificationEntry()
return false;
}
-inline bool LogEntry::handlePassiveCheckEntry()
+bool LogEntry::handlePassiveCheckEntry()
{
if (!strncmp(_text, "PASSIVE SERVICE CHECK: ", 23)
|| !strncmp(_text, "PASSIVE HOST CHECK: ", 20))
@@ -343,7 +343,7 @@ inline bool LogEntry::handlePassiveCheckEntry()
return false;
}
-inline bool LogEntry::handleExternalCommandEntry()
+bool LogEntry::handleExternalCommandEntry()
{
if (!strncmp(_text, "EXTERNAL COMMAND:", 17))
{
@@ -359,7 +359,7 @@ inline bool LogEntry::handleExternalCommandEntry()
return false;
}
-inline bool LogEntry::handleTextEntry()
+bool LogEntry::handleTextEntry()
{
if (!strncmp(_text, "LOG VERSION: 2.0", 16))
{
@@ -377,7 +377,7 @@ inline bool LogEntry::handleTextEntry()
return false;
}
-inline bool LogEntry::handleProgrammEntry()
+bool LogEntry::handleProgrammEntry()
{
if (strstr(_text, "starting...") ||
strstr(_text, "active mode..."))
@@ -403,7 +403,7 @@ inline bool LogEntry::handleProgrammEntry()
}
-inline int LogEntry::serviceStateToInt(char *s)
+int LogEntry::serviceStateToInt(char *s)
{
if (!s)
return 3; // can happen at garbled log line
@@ -424,7 +424,7 @@ inline int LogEntry::serviceStateToInt(char *s)
}
-inline int LogEntry::hostStateToInt(char *s)
+int LogEntry::hostStateToInt(char *s)
{
if (!s)
return 2; // can happen at garbled log line
diff --git a/livestatus/src/Logfile.cc b/livestatus/src/Logfile.cc
index f445475..cddb486 100644
--- a/livestatus/src/Logfile.cc
+++ b/livestatus/src/Logfile.cc
@@ -180,7 +180,7 @@ long Logfile::freeMessages(unsigned logclasses)
return freed;
}
-inline bool Logfile::processLogLine(uint32_t lineno, unsigned logclasses)
+bool Logfile::processLogLine(uint32_t lineno, unsigned logclasses)
{
LogEntry *entry = new LogEntry(lineno, _linebuffer);
// ignored invalid lines
diff --git a/livestatus/src/TableStateHistory.cc b/livestatus/src/TableStateHistory.cc
index 02887c9..1c92df1 100644
--- a/livestatus/src/TableStateHistory.cc
+++ b/livestatus/src/TableStateHistory.cc
@@ -637,7 +637,7 @@ bool TableStateHistory::objectFilteredOut(Query *query, void *entry)
return false;
}
-inline int TableStateHistory::updateHostServiceState(Query *query, const LogEntry *entry,
HostServiceState *hs_state, const bool only_update){
+int TableStateHistory::updateHostServiceState(Query *query, const LogEntry *entry,
HostServiceState *hs_state, const bool only_update){
int state_changed = 1;
// Revive host / service if it was unmonitored
@@ -814,7 +814,7 @@ inline int TableStateHistory::updateHostServiceState(Query *query,
const LogEntr
}
-inline void TableStateHistory::process(Query *query, HostServiceState *hs_state)
+void TableStateHistory::process(Query *query, HostServiceState *hs_state)
{
hs_state->_duration = hs_state->_until - hs_state->_from;
hs_state->_duration_part = (double)hs_state->_duration /
(double)_query_timeframe;