Merge pull request #6757 from Icinga/bugfix/no-more-notifications-recovery-filtered

Fix that no_more_notifications gets reset when Recovery notifications are filtered away
This commit is contained in:
Michael Friedrich 2018-12-05 11:05:44 +01:00 committed by GitHub
commit 26f411638f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View 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;
}