[icinga-checkins] icinga.org: icinga2/master: Fix Downtime validation function signature

git at icinga.org git at icinga.org
Tue Jul 5 13:17:24 CEST 2016


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

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Tue Jul  5 13:17:18 2016 +0200

Fix Downtime validation function signature

refs #11483

---

 lib/icinga/downtime.cpp |    4 ++--
 lib/icinga/downtime.hpp |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp
index ee916c2..c903ab5 100644
--- a/lib/icinga/downtime.cpp
+++ b/lib/icinga/downtime.cpp
@@ -367,7 +367,7 @@ void Downtime::DowntimesExpireTimerHandler(void)
 	}
 }
 
-void Downtime::ValidateStartTime(double value, const ValidationUtils& utils)
+void Downtime::ValidateStartTime(const Timestamp& value, const ValidationUtils& utils)
 {
 	ObjectImpl<Downtime>::ValidateStartTime(value, utils);
 
@@ -375,7 +375,7 @@ void Downtime::ValidateStartTime(double value, const ValidationUtils& utils)
 		BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("start_time"), "Start time must be greater than 0."));
 }
 
-void Downtime::ValidateEndTime(double value, const ValidationUtils& utils)
+void Downtime::ValidateEndTime(const Timestamp& value, const ValidationUtils& utils)
 {
 	ObjectImpl<Downtime>::ValidateEndTime(value, utils);
 
diff --git a/lib/icinga/downtime.hpp b/lib/icinga/downtime.hpp
index e2ef520..f52a99a 100644
--- a/lib/icinga/downtime.hpp
+++ b/lib/icinga/downtime.hpp
@@ -70,8 +70,8 @@ protected:
 	virtual void Start(bool runtimeCreated) override;
 	virtual void Stop(bool runtimeRemoved) override;
 
-	virtual void ValidateStartTime(double value, const ValidationUtils& utils) override;
-	virtual void ValidateEndTime(double value, const ValidationUtils& utils) override;
+	virtual void ValidateStartTime(const Timestamp& value, const ValidationUtils& utils) override;
+	virtual void ValidateEndTime(const Timestamp& value, const ValidationUtils& utils) override;
 
 private:
 	ObjectImpl<Checkable>::Ptr m_Checkable;



More information about the icinga-checkins mailing list