mirror of https://github.com/Icinga/icinga2.git
Fix 'force' parameter for notifications.
This commit is contained in:
parent
ce44c9e249
commit
b4f5ff90b6
|
@ -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 New Issue