mirror of https://github.com/Icinga/icinga2.git
parent
f7171e3e90
commit
eb746b9929
|
@ -47,9 +47,6 @@ struct ServiceNextCheckExtractor
|
|||
*/
|
||||
double operator()(const Service::Ptr& service)
|
||||
{
|
||||
if (!service->HasAuthority("checker"))
|
||||
return Utility::GetTime() + 60;
|
||||
|
||||
return service->GetNextCheck();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -74,6 +74,9 @@ void DynamicObject::SetAuthority(const String& type, bool value)
|
|||
if (old_value == value)
|
||||
return;
|
||||
|
||||
if (GetAuthorityInfo() == NULL)
|
||||
SetAuthorityInfo(make_shared<Dictionary>());
|
||||
|
||||
GetAuthorityInfo()->Set(type, value);
|
||||
}
|
||||
|
||||
|
@ -84,7 +87,7 @@ bool DynamicObject::HasAuthority(const String& type) const
|
|||
{
|
||||
Dictionary::Ptr authorityInfo = GetAuthorityInfo();
|
||||
|
||||
if (!authorityInfo->Contains(type))
|
||||
if (!authorityInfo || !authorityInfo->Contains(type))
|
||||
return true;
|
||||
|
||||
return authorityInfo->Get(type);
|
||||
|
|
|
@ -10,9 +10,7 @@ abstract class DynamicObject
|
|||
[config] Array::Ptr domains;
|
||||
[config] Array::Ptr authorities;
|
||||
[get_protected] bool active;
|
||||
Dictionary::Ptr authority_info {
|
||||
default {{{ return make_shared<Dictionary>(); }}}
|
||||
};
|
||||
Dictionary::Ptr authority_info;
|
||||
[protected] Dictionary::Ptr extensions;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue