mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
Fix compiler warnings and style
This commit is contained in:
parent
ffa7b749cb
commit
a3c6797310
@ -461,7 +461,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
for (int conflict : {NotificationProblem | NotificationRecovery, NotificationFlappingStart | NotificationFlappingEnd}) {
|
for (int conflict : {NotificationProblem | NotificationRecovery, NotificationFlappingStart | NotificationFlappingEnd}) {
|
||||||
/* E.g. problem and recovery notifications neutralize each other. */
|
/* E.g. problem and recovery notifications neutralize each other. */
|
||||||
|
|
||||||
if (suppressed_types_after & conflict == conflict) {
|
if ((suppressed_types_after & conflict) == conflict) {
|
||||||
suppressed_types_after &= ~conflict;
|
suppressed_types_after &= ~conflict;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,6 +121,9 @@ static void FireSuppressedNotifications(Checkable* checkable)
|
|||||||
break;
|
break;
|
||||||
case NotificationFlappingEnd:
|
case NotificationFlappingEnd:
|
||||||
still_applies = !checkable->IsFlapping();
|
still_applies = !checkable->IsFlapping();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (still_applies) {
|
if (still_applies) {
|
||||||
@ -128,12 +131,17 @@ static void FireSuppressedNotifications(Checkable* checkable)
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case NotificationProblem:
|
case NotificationProblem:
|
||||||
|
/* Fall through. */
|
||||||
case NotificationRecovery:
|
case NotificationRecovery:
|
||||||
still_suppressed = !checkable->IsReachable(DependencyNotification) || checkable->IsInDowntime() || checkable->IsAcknowledged();
|
still_suppressed = !checkable->IsReachable(DependencyNotification) || checkable->IsInDowntime() || checkable->IsAcknowledged();
|
||||||
break;
|
break;
|
||||||
case NotificationFlappingStart:
|
case NotificationFlappingStart:
|
||||||
|
/* Fall through. */
|
||||||
case NotificationFlappingEnd:
|
case NotificationFlappingEnd:
|
||||||
still_suppressed = checkable->IsInDowntime();
|
still_suppressed = checkable->IsInDowntime();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!still_suppressed && checkable->GetEnableActiveChecks()) {
|
if (!still_suppressed && checkable->GetEnableActiveChecks()) {
|
||||||
@ -169,6 +177,7 @@ static void FireSuppressedNotifications(Checkable* checkable)
|
|||||||
|
|
||||||
if (subtract) {
|
if (subtract) {
|
||||||
ObjectLock olock (checkable);
|
ObjectLock olock (checkable);
|
||||||
|
|
||||||
int suppressed_types_before (checkable->GetSuppressedNotifications());
|
int suppressed_types_before (checkable->GetSuppressedNotifications());
|
||||||
int suppressed_types_after (suppressed_types_before & ~subtract);
|
int suppressed_types_after (suppressed_types_before & ~subtract);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user