]> granicus.if.org Git - icinga2/commitdiff
Fix acknowledgement with expire time not added as comment expire_time
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 17 Apr 2015 14:44:40 +0000 (16:44 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 17 Apr 2015 14:46:46 +0000 (16:46 +0200)
GetExpireTime() is always set to 0 which will make the comment reflect
wrong information compared to the text.

fixes #9041

lib/icinga/externalcommandprocessor.cpp

index e9554d179288ec9ddd91da9f29eaafe80e018234..53a35f81a103fbd7d065e53988320bcf1847c831 100644 (file)
@@ -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);
 }