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