mirror of https://github.com/Icinga/icinga2.git
Fix missing lock and clear ack comments in RemoveHostAcknowledgement().
This commit is contained in:
parent
1d32c5b2d3
commit
bcc17be2ca
|
@ -733,9 +733,14 @@ void ExternalCommandProcessor::RemoveHostAcknowledgement(double, const std::vect
|
||||||
|
|
||||||
Log(LogInformation, "icinga", "Removing acknowledgement for host '" + host->GetName() + "'");
|
Log(LogInformation, "icinga", "Removing acknowledgement for host '" + host->GetName() + "'");
|
||||||
Service::Ptr service = host->GetCheckService();
|
Service::Ptr service = host->GetCheckService();
|
||||||
if (service)
|
if (service) {
|
||||||
|
{
|
||||||
|
ObjectLock olock(service);
|
||||||
service->ClearAcknowledgement();
|
service->ClearAcknowledgement();
|
||||||
}
|
}
|
||||||
|
service->RemoveCommentsByType(CommentAcknowledgement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ExternalCommandProcessor::EnableHostgroupSvcChecks(double, const std::vector<String>& arguments)
|
void ExternalCommandProcessor::EnableHostgroupSvcChecks(double, const std::vector<String>& arguments)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue