FolderSync when ActiveSync server loses state
Submitted by Graham Cobb
Assigned to SyncEvolution Community
Description
On occasion, the ActiveSync server loses state and insists that the client refetches the folder list with folder sync key 0. Currently there is no way for the user to fix that, except finding the folder cache file and deleting it.
The attached patches add a hack to handle this case and allow folder syncs to recover. The hack is that folder syncs always restart from sync key 0. This means that when the problem occurs, the user can recover by forcing a folder sync (for example using --print-databases).
There are two patches. The first patch, 0001-eas-daemon-add-eas_connection_forget_folders.patch, is not a hack. This adds the capability to reset the folder sync, which is required in any solution to the problem.
The second patch, 0001-eas-daemon-workround-folder-sync-when-server-loses-s.patch, is the hack. This always calls eas_connection_forget_folders before doing a folder sync. This could be optimised further in future if desired.