Merge pull request #8014 from Icinga/bugfix/icinga-db-ack-expire-8012

Icinga DB: record ack expiries
This commit is contained in:
Noah Hilverling 2020-05-19 11:16:28 +02:00 committed by GitHub
commit 7395465089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -143,15 +143,7 @@ void Checkable::ClearAcknowledgement(const String& removedBy, double changeTime,
{
ObjectLock oLock (this);
bool wasAcked;
if (GetAcknowledgementRaw() == AcknowledgementNone) {
wasAcked = false;
} else {
double expiry = GetAcknowledgementExpiry();
wasAcked = expiry == 0 || expiry >= Utility::GetTime();
}
bool wasAcked = GetAcknowledgementRaw() != AcknowledgementNone;
SetAcknowledgementRaw(AcknowledgementNone);
SetAcknowledgementExpiry(0);