mirror of https://github.com/Icinga/icinga2.git
parent
03a0815357
commit
3d7c103035
|
@ -325,11 +325,11 @@ void ServiceDbObject::AddComments(const Service::Ptr& service)
|
||||||
/* dump all comments */
|
/* dump all comments */
|
||||||
Dictionary::Ptr comments = service->GetComments();
|
Dictionary::Ptr comments = service->GetComments();
|
||||||
|
|
||||||
ObjectLock olock(comments);
|
|
||||||
|
|
||||||
if (comments->GetLength() > 0)
|
if (comments->GetLength() > 0)
|
||||||
RemoveComments(service);
|
RemoveComments(service);
|
||||||
|
|
||||||
|
ObjectLock olock(comments);
|
||||||
|
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, comments) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, comments) {
|
||||||
AddComment(service, kv.second);
|
AddComment(service, kv.second);
|
||||||
}
|
}
|
||||||
|
@ -490,11 +490,11 @@ void ServiceDbObject::AddDowntimes(const Service::Ptr& service)
|
||||||
/* dump all downtimes */
|
/* dump all downtimes */
|
||||||
Dictionary::Ptr downtimes = service->GetDowntimes();
|
Dictionary::Ptr downtimes = service->GetDowntimes();
|
||||||
|
|
||||||
ObjectLock olock(downtimes);
|
|
||||||
|
|
||||||
if (downtimes->GetLength() > 0)
|
if (downtimes->GetLength() > 0)
|
||||||
RemoveDowntimes(service);
|
RemoveDowntimes(service);
|
||||||
|
|
||||||
|
ObjectLock olock(downtimes);
|
||||||
|
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, downtimes) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, downtimes) {
|
||||||
AddDowntime(service, kv.second);
|
AddDowntime(service, kv.second);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue