From: Michael Friedrich Date: Fri, 17 Apr 2015 14:44:40 +0000 (+0200) Subject: Fix acknowledgement with expire time not added as comment expire_time X-Git-Tag: v2.3.4~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57cc7b195afd8002fb1c4528a5663bcaed9da728;p=icinga2 Fix acknowledgement with expire time not added as comment expire_time GetExpireTime() is always set to 0 which will make the comment reflect wrong information compared to the text. fixes #9041 --- diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp index e9554d179..53a35f81a 100644 --- a/lib/icinga/externalcommandprocessor.cpp +++ b/lib/icinga/externalcommandprocessor.cpp @@ -677,7 +677,7 @@ void ExternalCommandProcessor::AcknowledgeSvcProblemExpire(double, const std::ve Log(LogNotice, "ExternalCommandProcessor") << "Setting timed acknowledgement for service '" << service->GetName() << "'" << (notify ? "" : ". Disabled notification"); - service->AddComment(CommentAcknowledgement, arguments[6], arguments[7], 0); + service->AddComment(CommentAcknowledgement, arguments[6], arguments[7], timestamp); service->AcknowledgeProblem(arguments[6], arguments[7], sticky ? AcknowledgementSticky : AcknowledgementNormal, notify, timestamp); } @@ -736,7 +736,7 @@ void ExternalCommandProcessor::AcknowledgeHostProblemExpire(double, const std::v if (host->GetState() == HostUp) BOOST_THROW_EXCEPTION(std::invalid_argument("The host '" + arguments[0] + "' is OK.")); - host->AddComment(CommentAcknowledgement, arguments[5], arguments[6], 0); + host->AddComment(CommentAcknowledgement, arguments[5], arguments[6], timestamp); host->AcknowledgeProblem(arguments[5], arguments[6], sticky ? AcknowledgementSticky : AcknowledgementNormal, notify, timestamp); }