From: Michael Friedrich Date: Thu, 13 Mar 2014 15:43:32 +0000 (+0100) Subject: Remove comment when clearing acknowledgement. X-Git-Tag: v0.0.9~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f7881736ea58651b2848717f0ac1b8940995a49;p=icinga2 Remove comment when clearing acknowledgement. Fixes #5366 --- diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp index 3243d4b29..09ab3a850 100644 --- a/lib/icinga/externalcommandprocessor.cpp +++ b/lib/icinga/externalcommandprocessor.cpp @@ -666,8 +666,12 @@ void ExternalCommandProcessor::RemoveSvcAcknowledgement(double, const std::vecto Log(LogInformation, "icinga", "Removing acknowledgement for service '" + service->GetName() + "'"); - ObjectLock olock(service); - service->ClearAcknowledgement(); + { + ObjectLock olock(service); + service->ClearAcknowledgement(); + } + + service->RemoveCommentsByType(CommentAcknowledgement); } void ExternalCommandProcessor::AcknowledgeHostProblem(double, const std::vector& arguments)