From d082e8c1b19c88a68e0381db7f5806f31fe8523d Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 8 Nov 2018 12:13:32 +0100 Subject: [PATCH] Fix that no_more_notifications gets reset when Recovery notifications are filtered away Hello from the OSMC hackathon :) --- lib/icinga/notification.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp index 19dc8268d..ba6ca49b4 100644 --- a/lib/icinga/notification.cpp +++ b/lib/icinga/notification.cpp @@ -317,6 +317,16 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe << "Not sending " << (reminder ? "reminder " : " ") << "notifications for notification object '" << GetName() << "': type '" << NotificationTypeToStringInternal(type) << "' does not match type filter: " << NotificationFilterToString(GetTypeFilter(), GetTypeFilterMap()) << "."; + + /* Ensure to reset no_more_notifications on Recovery notifications, + * even if the admin did not configure them in the filter. + */ + { + ObjectLock olock(this); + if (type == NotificationRecovery && GetInterval() <= 0) + SetNoMoreNotifications(false); + } + return; }