Fix Service::GetEnablePerfdata().

This commit is contained in:
Gunnar Beutner 2013-10-16 18:36:14 +02:00
parent 0ab76e7843
commit 204f04f295
3 changed files with 6 additions and 3 deletions

View File

@ -94,7 +94,7 @@ void GraphiteWriter::ReconnectTimerHandler(void)
void GraphiteWriter::CheckResultHandler(const Service::Ptr& service, const Dictionary::Ptr& cr)
{
if (!(IcingaApplication::GetInstance()->GetEnablePerfdata() && service->GetEnablePerfdata()))
if (!IcingaApplication::GetInstance()->GetEnablePerfdata() || !service->GetEnablePerfdata())
return;
Host::Ptr host = service->GetHost();

View File

@ -84,7 +84,7 @@ double PerfdataWriter::GetRotationInterval(void) const
void PerfdataWriter::CheckResultHandler(const Service::Ptr& service, const Dictionary::Ptr& cr)
{
if (!(IcingaApplication::GetInstance()->GetEnablePerfdata() && service->GetEnablePerfdata()))
if (!IcingaApplication::GetInstance()->GetEnablePerfdata() || !service->GetEnablePerfdata())
return;
Host::Ptr host = service->GetHost();

View File

@ -330,7 +330,10 @@ std::set<Service::Ptr> Service::GetParentServices(void) const
bool Service::GetEnablePerfdata(void) const
{
return m_EnablePerfdata;
if (!m_EnablePerfdata.IsEmpty())
return m_EnablePerfdata;
else
return true;
}
int Service::GetModifiedAttributes(void) const