"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/icinga/notification.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

notification.cpp  (icinga2-2.11.5):notification.cpp  (icinga2-2.12.0)
skipping to change at line 237 skipping to change at line 237
Checkable::Ptr checkable = GetCheckable(); Checkable::Ptr checkable = GetCheckable();
if (!force) { if (!force) {
TimePeriod::Ptr tp = GetPeriod(); TimePeriod::Ptr tp = GetPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) { if (tp && !tp->IsInside(Utility::GetTime())) {
Log(LogNotice, "Notification") Log(LogNotice, "Notification")
<< "Not sending " << (reminder ? "reminder " : "" ) << "notifications for notification object '" << notificationName << "Not sending " << (reminder ? "reminder " : "" ) << "notifications for notification object '" << notificationName
<< "': not in timeperiod '" << tp->GetName() << " '"; << "': not in timeperiod '" << tp->GetName() << " '";
if (!reminder) {
switch (type) {
case NotificationProblem:
case NotificationRecovery:
case NotificationFlappingStart:
case NotificationFlappingEnd:
{
/* If a non-reminder noti
fication was suppressed, but just because of its time period,
* stash it into a notifi
cation types bitmask for maybe re-sending later.
*/
ObjectLock olock (this);
int suppressedTypesBefore
(GetSuppressedNotifications());
int suppressedTypesAfter
(suppressedTypesBefore | type);
for (int conflict : {Noti
ficationProblem | NotificationRecovery, NotificationFlappingStart | Notification
FlappingEnd}) {
/* E.g. problem a
nd recovery notifications neutralize each other. */
if ((suppressedTy
pesAfter & conflict) == conflict) {
suppresse
dTypesAfter &= ~conflict;
}
}
if (suppressedTypesAfter
!= suppressedTypesBefore) {
SetSuppressedNoti
fications(suppressedTypesAfter);
}
}
default:
; // Cheating the compiler on "5
enumeration values not handled in switch"
}
}
return; return;
} }
double now = Utility::GetTime(); double now = Utility::GetTime();
Dictionary::Ptr times = GetTimes(); Dictionary::Ptr times = GetTimes();
if (times && type == NotificationProblem) { if (times && type == NotificationProblem) {
Value timesBegin = times->Get("begin"); Value timesBegin = times->Get("begin");
Value timesEnd = times->Get("end"); Value timesEnd = times->Get("end");
 End of changes. 1 change blocks. 
0 lines changed or deleted 45 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)