Commit 9ae3ae18 authored by sebastian's avatar sebastian

ZP-621 #comment added new SyncCollections state "HIERARCHY_CHANGED" which does...

ZP-621 #comment added new SyncCollections state "HIERARCHY_CHANGED" which does not indicate an error and let Ping return SYNC_PINGSTATUS_FOLDERHIERSYNCREQUIRED as well in this case

git-svn-id: https://z-push.org/svn/z-push/trunk@1960 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 1a2681c4
......@@ -54,6 +54,7 @@ class SyncCollections implements Iterator {
const ERROR_NO_COLLECTIONS = 1;
const ERROR_WRONG_HIERARCHY = 2;
const OBSOLETE_CONNECTION = 3;
const HIERARCHY_CHANGED = 4;
private $stateManager;
......@@ -473,7 +474,7 @@ class SyncCollections implements Iterator {
// Check if a hierarchy sync is necessary
if (ZPush::GetDeviceManager()->IsHierarchySyncRequired())
throw new StatusException("SyncCollections->CheckForChanges(): HierarchySync required.", self::ERROR_WRONG_HIERARCHY);
throw new StatusException("SyncCollections->CheckForChanges(): HierarchySync required.", self::HIERARCHY_CHANGED);
// Check if there are newer requests
// If so, this process should be terminated if more than 60 secs to go
......
......@@ -174,6 +174,9 @@ class Ping extends RequestProcessor {
case SyncCollections::OBSOLETE_CONNECTION:
$foundchanges = false;
break;
case SyncCollections::HIERARCHY_CHANGED:
$pingstatus = SYNC_PINGSTATUS_FOLDERHIERSYNCREQUIRED;
break;
}
}
......
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