mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
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:
parent
23e30ccb67
commit
a13e6b3e87
@ -48,14 +48,14 @@ void Checkable::SendNotifications(NotificationType type, const CheckResult::Ptr&
|
|||||||
|
|
||||||
bool force = GetForceNextNotification();
|
bool force = GetForceNextNotification();
|
||||||
|
|
||||||
|
SetForceNextNotification(false);
|
||||||
|
|
||||||
if (!IcingaApplication::GetInstance()->GetEnableNotifications() || !GetEnableNotifications()) {
|
if (!IcingaApplication::GetInstance()->GetEnableNotifications() || !GetEnableNotifications()) {
|
||||||
if (!force) {
|
if (!force) {
|
||||||
Log(LogInformation, "Checkable")
|
Log(LogInformation, "Checkable")
|
||||||
<< "Notifications are disabled for service '" << GetName() << "'.";
|
<< "Notifications are disabled for service '" << GetName() << "'.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetForceNextNotification(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LogInformation, "Checkable")
|
Log(LogInformation, "Checkable")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user