Fix missing lock and clear ack comments in RemoveHostAcknowledgement().

This commit is contained in:
Michael Friedrich 2014-03-19 22:08:28 +01:00
parent 1d32c5b2d3
commit bcc17be2ca
1 changed files with 7 additions and 2 deletions

View File

@ -733,9 +733,14 @@ void ExternalCommandProcessor::RemoveHostAcknowledgement(double, const std::vect
Log(LogInformation, "icinga", "Removing acknowledgement for host '" + host->GetName() + "'");
Service::Ptr service = host->GetCheckService();
if (service)
if (service) {
{
ObjectLock olock(service);
service->ClearAcknowledgement();
}
service->RemoveCommentsByType(CommentAcknowledgement);
}
}
void ExternalCommandProcessor::EnableHostgroupSvcChecks(double, const std::vector<String>& arguments)
{