[icinga-checkins] icinga.org: icinga2/master: livestatus: fix check_type (0..active, 1.. passive)

git at icinga.org git at icinga.org
Thu Jul 11 11:55:54 CEST 2013


Module: icinga2
Branch: master
Commit: f631304a2377435949d817fa62f789814e11848d
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=f631304a2377435949d817fa62f789814e11848d

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Jul 11 11:55:32 2013 +0200

livestatus: fix check_type (0..active, 1..passive)

refs #4372

---

 components/livestatus/hoststable.cpp    |    2 +-
 components/livestatus/servicestable.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp
index a701924..5504a24 100644
--- a/components/livestatus/hoststable.cpp
+++ b/components/livestatus/hoststable.cpp
@@ -465,7 +465,7 @@ Value HostsTable::CheckTypeAccessor(const Value& row)
 	if (!hc)
 		return Value();
 
-	return (hc->GetEnableActiveChecks() ? 1 : 0);
+	return (hc->GetEnableActiveChecks() ? 0 : 1);
 }
 
 Value HostsTable::LastStateAccessor(const Value& row)
diff --git a/components/livestatus/servicestable.cpp b/components/livestatus/servicestable.cpp
index c47788e..1f506a4 100644
--- a/components/livestatus/servicestable.cpp
+++ b/components/livestatus/servicestable.cpp
@@ -334,7 +334,7 @@ Value ServicesTable::StateTypeAccessor(const Value& row)
 
 Value ServicesTable::CheckTypeAccessor(const Value& row)
 {
-	return (static_cast<Service::Ptr>(row)->GetEnableActiveChecks() ? 1 : 0);
+	return (static_cast<Service::Ptr>(row)->GetEnableActiveChecks() ? 0 : 1);
 }
 
 Value ServicesTable::AcknowledgedAccessor(const Value& row)





More information about the icinga-checkins mailing list