Commit 4994dd57 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-968 Execute check on state usage only on ZCP versions before 7.2.3.

Nothing changes for systems without ZCP/KC as the check is executed as
before.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 007fb73c
...@@ -679,11 +679,14 @@ class SyncCollections implements Iterator { ...@@ -679,11 +679,14 @@ class SyncCollections implements Iterator {
return false; return false;
} }
// prevent ZP-623 by checking if the states have been used before, if so force a sync on this folder // Prevent ZP-623 by checking if the states have been used before, if so force a sync on this folder.
if (ZPush::GetDeviceManager()->CheckHearbeatStateIntegrity($spa->GetFolderId(), $spa->GetUuid(), $spa->GetUuidCounter())) { // ZCP/KC 7.2.3 and newer support SYNC_STATE_READONLY so this behaviour is not required (see ZP-968).
ZLog::Write(LOGLEVEL_DEBUG, "SyncCollections->CountChange(): Cannot verify changes for state as it was already used. Forcing sync of folder."); if (!Utils::CheckMapiExtVersion('7.2.3')) {
$this->changes[$folderid] = 1; if (ZPush::GetDeviceManager()->CheckHearbeatStateIntegrity($spa->GetFolderId(), $spa->GetUuid(), $spa->GetUuidCounter())) {
return true; ZLog::Write(LOGLEVEL_DEBUG, "SyncCollections->CountChange(): Cannot verify changes for state as it was already used. Forcing sync of folder.");
$this->changes[$folderid] = 1;
return true;
}
} }
$backendFolderId = ZPush::GetDeviceManager()->GetBackendIdForFolderId($folderid); $backendFolderId = ZPush::GetDeviceManager()->GetBackendIdForFolderId($folderid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment