]> granicus.if.org Git - icinga2/commitdiff
Fix that no_more_notifications gets reset when Recovery notifications are filtered... 6757/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Thu, 8 Nov 2018 11:13:32 +0000 (12:13 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Thu, 8 Nov 2018 11:13:32 +0000 (12:13 +0100)
Hello from the OSMC hackathon :)

lib/icinga/notification.cpp

index 19dc8268d5ea571fef58f71710493a3196630b6a..ba6ca49b4d2bb1a9fd063cf9f83497a5358baa10 100644 (file)
@@ -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;
                }