mirror of https://github.com/Icinga/icinga2.git
Fix crash in Downtime::DowntimesExpireTimerHandler
fixes #11534 fixes #11559
This commit is contained in:
parent
2d7f6ab484
commit
974ca9f38b
|
@ -244,7 +244,7 @@ void Comment::CommentsExpireTimerHandler(void)
|
|||
}
|
||||
|
||||
BOOST_FOREACH(const Comment::Ptr& comment, comments) {
|
||||
if (comment->IsExpired())
|
||||
if (comment->IsActive() && comment->IsExpired())
|
||||
RemoveComment(comment->GetName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -358,7 +358,7 @@ void Downtime::DowntimesExpireTimerHandler(void)
|
|||
}
|
||||
|
||||
BOOST_FOREACH(const Downtime::Ptr& downtime, downtimes) {
|
||||
if (downtime->IsExpired())
|
||||
if (downtime->IsActive() && downtime->IsExpired())
|
||||
RemoveDowntime(downtime->GetName(), false, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,6 +72,9 @@ void NotificationComponent::NotificationTimerHandler(void)
|
|||
double now = Utility::GetTime();
|
||||
|
||||
BOOST_FOREACH(const Notification::Ptr& notification, ConfigType::GetObjectsByType<Notification>()) {
|
||||
if (!notification->IsActive())
|
||||
continue;
|
||||
|
||||
Checkable::Ptr checkable = notification->GetCheckable();
|
||||
|
||||
if (checkable->IsPaused() && GetEnableHA())
|
||||
|
|
Loading…
Reference in New Issue