Ignore check results if we have a local result that's newer.

This commit is contained in:
Gunnar Beutner 2013-09-12 17:39:29 +02:00
parent cbc53db5c1
commit b887b558bc
1 changed files with 3 additions and 0 deletions

View File

@ -472,6 +472,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr, const String& author
long old_attempt = GetCurrentCheckAttempt();
bool recovery;
if (old_cr && cr->Get("execution_start") < old_cr->Get("execution_start"))
return;
/* The ExecuteCheck function already sets the old state, but we need to do it again
* in case this was a passive check result. */
SetLastState(old_state);