[icinga-checkins] icinga.org: icinga2/master: Fix that custom notifications do not reset force_next_notification
git at icinga.org
git at icinga.org
Thu Nov 17 11:53:40 CET 2016
Module: icinga2
Branch: master
Commit: a13e6b3e87adc928974c8b5ef9b7da44c9005dee
URL: https://git.icinga.org/?p=icinga2.git;a=commit;h=a13e6b3e87adc928974c8b5ef9b7da44c9005dee
Author: Michael Friedrich <michael.friedrich at icinga.com>
Date: Thu Nov 17 11:46:40 2016 +0100
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
---
lib/icinga/checkable-notification.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/icinga/checkable-notification.cpp b/lib/icinga/checkable-notification.cpp
index ac77616..a9c804a 100644
--- a/lib/icinga/checkable-notification.cpp
+++ b/lib/icinga/checkable-notification.cpp
@@ -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")
More information about the icinga-checkins
mailing list