Merge pull request 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
lib/icinga

View File

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