mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
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)
|
void Service::SendNotifications(NotificationType type, const Dictionary::Ptr& cr, const String& author, const String& text)
|
||||||
{
|
{
|
||||||
bool force = false;
|
bool force = GetForceNextNotification();
|
||||||
|
|
||||||
if (!GetEnableNotifications()) {
|
if (!GetEnableNotifications()) {
|
||||||
if (!GetForceNextNotification()) {
|
if (!force) {
|
||||||
Log(LogInformation, "icinga", "Notifications are disabled for service '" + GetName() + "'.");
|
Log(LogInformation, "icinga", "Notifications are disabled for service '" + GetName() + "'.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
force = true;
|
|
||||||
SetForceNextNotification(false);
|
SetForceNextNotification(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user