diff --git a/OpenChange/MAPIStoreGCSFolder.m b/OpenChange/MAPIStoreGCSFolder.m index 370651c31..513b50106 100644 --- a/OpenChange/MAPIStoreGCSFolder.m +++ b/OpenChange/MAPIStoreGCSFolder.m @@ -226,6 +226,8 @@ max = [fetchResults count]; if (max > 0) { + ldb_transaction_start([[self context] connectionInfo]->oc_ctx); + for (count = 0; count < max; count++) { result = [fetchResults objectAtIndex: count]; @@ -260,7 +262,9 @@ lastModificationDate = cLastModified; } } - + + ldb_transaction_commit([[self context] connectionInfo]->oc_ctx); + if (foundChange) { ti = [NSNumber numberWithDouble: [now timeIntervalSince1970]]; diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index 1e143568f..2c1662e83 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -496,6 +496,9 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) fetchResults = [fetchResults sortedArrayUsingFunction: _compareFetchResultsByMODSEQ context: NULL]; + + ldb_transaction_start([[self context] connectionInfo]->oc_ctx); + for (count = 0; count < max; count++) { result = [fetchResults objectAtIndex: count]; @@ -519,6 +522,8 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) lastModseq = modseq; } + ldb_transaction_commit([[self context] connectionInfo]->oc_ctx); + ti = [NSNumber numberWithDouble: [now timeIntervalSince1970]]; [currentProperties setObject: ti forKey: @"SyncLastSynchronisationDate"];