mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
parent
0b41af7639
commit
5e9ce84c17
@ -327,6 +327,9 @@ void ServiceDbObject::AddComments(const Service::Ptr& service)
|
|||||||
|
|
||||||
ObjectLock olock(comments);
|
ObjectLock olock(comments);
|
||||||
|
|
||||||
|
if (comments->GetLength() > 0)
|
||||||
|
RemoveComments(service);
|
||||||
|
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, comments) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, comments) {
|
||||||
AddComment(service, kv.second);
|
AddComment(service, kv.second);
|
||||||
}
|
}
|
||||||
@ -489,6 +492,9 @@ void ServiceDbObject::AddDowntimes(const Service::Ptr& service)
|
|||||||
|
|
||||||
ObjectLock olock(downtimes);
|
ObjectLock olock(downtimes);
|
||||||
|
|
||||||
|
if (downtimes->GetLength() > 0)
|
||||||
|
RemoveDowntimes(service);
|
||||||
|
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, downtimes) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, downtimes) {
|
||||||
AddDowntime(service, kv.second);
|
AddDowntime(service, kv.second);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user