void Notification::OnConfigLoaded(void)
{
- SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), 0));
- SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), 0));
+ SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), ~0));
+ SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), ~0));
GetCheckable()->AddNotification(GetSelf());
}
return;
}
- Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
Host::Ptr host;
-
- if (service)
- host = service->GetHost();
- else
- host = static_pointer_cast<Host>(checkable);
+ Service::Ptr service;
+ tie(host, service) = GetHostService(checkable);
unsigned long fstate;
}
Checkable::Ptr checkable = GetCheckable();
- Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
Host::Ptr host;
-
- if (service)
- host = service->GetHost();
- else
- host = static_pointer_cast<Host>(checkable);
+ Service::Ptr service;
+ tie(host, service) = GetHostService(checkable);
unsigned long fstate;
{
Value resultTypeFilter;
- if (!typeFilters || typeFilters->GetLength() == 0)
+ if (!typeFilters)
return defaultValue;
resultTypeFilter = 0;
void User::OnConfigLoaded(void)
{
- SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), 0));
- SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), 0));
+ SetNotificationTypeFilter(FilterArrayToInt(GetNotificationTypeFilterRaw(), ~0));
+ SetNotificationStateFilter(FilterArrayToInt(GetNotificationStateFilterRaw(), ~0));
Array::Ptr groups = GetGroups();