mirror of https://github.com/Icinga/icinga2.git
Don't allow retry_interval <= 0
This commit is contained in:
parent
b1442645ce
commit
8cbd482072
|
@ -198,6 +198,14 @@ void Checkable::ValidateCheckInterval(const Lazy<double>& lvalue, const Validati
|
|||
BOOST_THROW_EXCEPTION(ValidationError(this, { "check_interval" }, "Interval must be greater than 0."));
|
||||
}
|
||||
|
||||
void Checkable::ValidateRetryInterval(const Lazy<double>& lvalue, const ValidationUtils& utils)
|
||||
{
|
||||
ObjectImpl<Checkable>::ValidateRetryInterval(lvalue, utils);
|
||||
|
||||
if (lvalue() <= 0)
|
||||
BOOST_THROW_EXCEPTION(ValidationError(this, { "retry_interval" }, "Interval must be greater than 0."));
|
||||
}
|
||||
|
||||
void Checkable::ValidateMaxCheckAttempts(const Lazy<int>& lvalue, const ValidationUtils& utils)
|
||||
{
|
||||
ObjectImpl<Checkable>::ValidateMaxCheckAttempts(lvalue, utils);
|
||||
|
|
|
@ -192,6 +192,7 @@ public:
|
|||
std::vector<intrusive_ptr<Dependency> > GetReverseDependencies() const;
|
||||
|
||||
void ValidateCheckInterval(const Lazy<double>& lvalue, const ValidationUtils& value) final;
|
||||
void ValidateRetryInterval(const Lazy<double>& lvalue, const ValidationUtils& value) final;
|
||||
void ValidateMaxCheckAttempts(const Lazy<int>& lvalue, const ValidationUtils& value) final;
|
||||
|
||||
static void IncreasePendingChecks();
|
||||
|
|
Loading…
Reference in New Issue