Fix that custom notifications do not reset force_next_notification

This attribute is stored in the state file forever as well.
Will cause forced notifications ignoring state/type filters.

fixes #12670
This commit is contained in:
Michael Friedrich 2016-11-17 11:46:40 +01:00
parent 23e30ccb67
commit a13e6b3e87
1 changed files with 2 additions and 2 deletions

View File

@ -48,14 +48,14 @@ void Checkable::SendNotifications(NotificationType type, const CheckResult::Ptr&
bool force = GetForceNextNotification();
SetForceNextNotification(false);
if (!IcingaApplication::GetInstance()->GetEnableNotifications() || !GetEnableNotifications()) {
if (!force) {
Log(LogInformation, "Checkable")
<< "Notifications are disabled for service '" << GetName() << "'.";
return;
}
SetForceNextNotification(false);
}
Log(LogInformation, "Checkable")