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