Fix host, service sort order in StatusDataWriter.

Fixes #5775
This commit is contained in:
Michael Friedrich 2014-03-16 14:59:19 +01:00
parent 40b88422d2
commit cb85a5c696
1 changed files with 13 additions and 13 deletions

View File

@ -553,6 +553,13 @@ void StatusDataWriter::UpdateObjectsCache(void)
tempobjectfp << std::fixed;
DumpHostObject(tempobjectfp, host);
objectfp << tempobjectfp.str();
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
std::ostringstream tempobjectfp;
tempobjectfp << std::fixed;
DumpServiceObject(tempobjectfp, service);
objectfp << tempobjectfp.str();
}
}
BOOST_FOREACH(const HostGroup::Ptr& hg, DynamicType::GetObjects<HostGroup>()) {
@ -572,13 +579,6 @@ void StatusDataWriter::UpdateObjectsCache(void)
objectfp << tempobjectfp.str();
}
BOOST_FOREACH(const Service::Ptr& service, DynamicType::GetObjects<Service>()) {
std::ostringstream tempobjectfp;
tempobjectfp << std::fixed;
DumpServiceObject(tempobjectfp, service);
objectfp << tempobjectfp.str();
}
BOOST_FOREACH(const ServiceGroup::Ptr& sg, DynamicType::GetObjects<ServiceGroup>()) {
std::ostringstream tempobjectfp;
tempobjectfp << std::fixed;
@ -742,13 +742,13 @@ void StatusDataWriter::StatusTimerHandler(void)
tempstatusfp << std::fixed;
DumpHostStatus(tempstatusfp, host);
statusfp << tempstatusfp.str();
}
BOOST_FOREACH(const Service::Ptr& service, DynamicType::GetObjects<Service>()) {
std::ostringstream tempstatusfp;
tempstatusfp << std::fixed;
DumpServiceStatus(tempstatusfp, service);
statusfp << tempstatusfp.str();
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
std::ostringstream tempstatusfp;
tempstatusfp << std::fixed;
DumpServiceStatus(tempstatusfp, service);
statusfp << tempstatusfp.str();
}
}
statusfp.close();