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
This commit is contained in:
Michael Friedrich 2015-04-17 16:44:40 +02:00
parent 9c45ab7d66
commit d3a56b6404
1 changed files with 2 additions and 2 deletions

View File

@ -677,7 +677,7 @@ void ExternalCommandProcessor::AcknowledgeSvcProblemExpire(double, const std::ve
Log(LogNotice, "ExternalCommandProcessor") Log(LogNotice, "ExternalCommandProcessor")
<< "Setting timed acknowledgement for service '" << service->GetName() << "'" << (notify ? "" : ". Disabled notification"); << "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); 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) if (host->GetState() == HostUp)
BOOST_THROW_EXCEPTION(std::invalid_argument("The host '" + arguments[0] + "' is OK.")); 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); host->AcknowledgeProblem(arguments[5], arguments[6], sticky ? AcknowledgementSticky : AcknowledgementNormal, notify, timestamp);
} }