From cc3652b59b40bcb420d806412277509ac247d85d Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 23 Mar 2015 17:23:29 -0400 Subject: [PATCH] improvements to EAS SyncKey handling to avoid missing mails (#3048, #3058) --- ActiveSync/SOGoActiveSyncDispatcher+Sync.m | 7 +++++-- NEWS | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m index 47aed901f..cdd4cd9d1 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m +++ b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m @@ -540,6 +540,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. { NSMutableDictionary *folderMetadata, *dateCache, *syncCache; + NSString *davCollectionTagToStore; NSAutoreleasePool *pool; NSMutableString *s; @@ -618,6 +619,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. more_available = NO; + davCollectionTagToStore = [theCollection davCollectionTag]; + switch (theFolderType) { // Handle all the GCS components @@ -788,7 +791,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. else { [folderMetadata removeObjectForKey: @"MoreAvailable"]; - [folderMetadata setObject: [theCollection davCollectionTag] forKey: @"SyncKey"]; + [folderMetadata setObject: davCollectionTagToStore forKey: @"SyncKey"]; } [self _setFolderMetadata: folderMetadata @@ -963,7 +966,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. else { [folderMetadata removeObjectForKey: @"MoreAvailable"]; - [folderMetadata setObject: [theCollection davCollectionTag] forKey: @"SyncKey"]; + [folderMetadata setObject: davCollectionTagToStore forKey: @"SyncKey"]; } [self _setFolderMetadata: folderMetadata forKey: [self _getNameInCache: theCollection withType: theFolderType]]; diff --git a/NEWS b/NEWS index 0d172d38d..176a81059 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,7 @@ Bug fixes - properly fallback over EAS to UTF-8 and then Latin1 for messages w/o charset (#3103) - prevent potential freebusy lookup crashes during timezone changes with repetitive events - improved GetItemEstimate to count all vasnished/deleted mails too + - improvements to EAS SyncKey handling to avoid missing mails (#3048, #3058) 2.2.16 (2015-02-12) -------------------