From 57cc7b195afd8002fb1c4528a5663bcaed9da728 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 17 Apr 2015 16:44:40 +0200 Subject: [PATCH] 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 --- lib/icinga/externalcommandprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.40.0