Page MenuHomePhorge

D4640.1775362217.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D4640.1775362217.diff

diff --git a/lib/ext/Syncroton/Command/Sync.php b/lib/ext/Syncroton/Command/Sync.php
--- a/lib/ext/Syncroton/Command/Sync.php
+++ b/lib/ext/Syncroton/Command/Sync.php
@@ -964,6 +964,12 @@
}
$totalChanges += $collectionChanges;
+
+ // If the client resent an old sync-key, we should still respond with the latest sync key
+ if (isset($collectionData->syncState->_next)) {
+ //TODO we're not resending the changes in between, but I'm not sure we have to.
+ $collectionData->syncState->counter = $collectionData->syncState->_next;
+ }
// increase SyncKey if needed
if ((
diff --git a/lib/kolab_sync_backend_state.php b/lib/kolab_sync_backend_state.php
--- a/lib/kolab_sync_backend_state.php
+++ b/lib/kolab_sync_backend_state.php
@@ -41,6 +41,7 @@
*/
public function create($object, $keep_previous_state = true)
{
+ unset($object->_next);
$object = parent::create($object);
if ($keep_previous_state !== true) {
@@ -184,6 +185,7 @@
if ($next > $sync_key) {
// We store the clientIdMap with the "next" sync state, so we need to copy it back.
$state->clientIdMap = $states[$next]->clientIdMap;
+ $state->_next = $next;
} else {
// finally delete all entries marked for removal in syncroton_content table
$retryCounter = 0;

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 5, 4:10 AM (10 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18832303
Default Alt Text
D4640.1775362217.diff (1 KB)

Event Timeline