mirror of
https://github.com/Icinga/icinga2.git
synced 2026-06-11 09:40:46 -04:00
Fix 'force' parameter for notifications.
This commit is contained in:
parent
ce44c9e249
commit
b4f5ff90b6
1 changed files with 2 additions and 3 deletions
|
|
@ -48,15 +48,14 @@ void Service::ResetNotificationNumbers(void)
|
|||
|
||||
void Service::SendNotifications(NotificationType type, const Dictionary::Ptr& cr, const String& author, const String& text)
|
||||
{
|
||||
bool force = false;
|
||||
bool force = GetForceNextNotification();
|
||||
|
||||
if (!GetEnableNotifications()) {
|
||||
if (!GetForceNextNotification()) {
|
||||
if (!force) {
|
||||
Log(LogInformation, "icinga", "Notifications are disabled for service '" + GetName() + "'.");
|
||||
return;
|
||||
}
|
||||
|
||||
force = true;
|
||||
SetForceNextNotification(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue