From d84a3306d5545b457dfede4c3b4ec89ef6dc1a07 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 8 Sep 2014 09:58:53 +0200 Subject: [PATCH] Make CompatUtility::GetCheckablePercentStateChange return a floating-point number --- lib/icinga/compatutility.cpp | 4 ++-- lib/icinga/compatutility.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icinga/compatutility.cpp b/lib/icinga/compatutility.cpp index 93b6364f2..e16aef709 100644 --- a/lib/icinga/compatutility.cpp +++ b/lib/icinga/compatutility.cpp @@ -242,9 +242,9 @@ int CompatUtility::GetCheckableIsReachable(const Checkable::Ptr& checkable) return (checkable->IsReachable() ? 1 : 0); } -String CompatUtility::GetCheckablePercentStateChange(const Checkable::Ptr& checkable) +double CompatUtility::GetCheckablePercentStateChange(const Checkable::Ptr& checkable) { - return Convert::ToString(checkable->GetFlappingCurrent()); + return checkable->GetFlappingCurrent(); } int CompatUtility::GetCheckableProcessPerformanceData(const Checkable::Ptr& checkable) diff --git a/lib/icinga/compatutility.hpp b/lib/icinga/compatutility.hpp index 1c2f9336f..1b8815d45 100644 --- a/lib/icinga/compatutility.hpp +++ b/lib/icinga/compatutility.hpp @@ -63,7 +63,7 @@ public: static int GetCheckableFlapDetectionEnabled(const Checkable::Ptr& checkable); static int GetCheckableIsFlapping(const Checkable::Ptr& checkable); static int GetCheckableIsReachable(const Checkable::Ptr& checkable); - static String GetCheckablePercentStateChange(const Checkable::Ptr& checkable); + static double GetCheckablePercentStateChange(const Checkable::Ptr& checkable); static int GetCheckableProcessPerformanceData(const Checkable::Ptr& checkable); static String GetCheckableEventHandler(const Checkable::Ptr& checkable);