From 1b983ef691f55e3588cc9afcb9ba841ca472d3d7 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 10 Apr 2013 09:56:23 -0400 Subject: [PATCH] Fixed a potential timing issue with Dovecot when getting the modseq --- OpenChange/MAPIStoreMailVolatileMessage.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenChange/MAPIStoreMailVolatileMessage.m b/OpenChange/MAPIStoreMailVolatileMessage.m index c8044d65f..fb5defdae 100644 --- a/OpenChange/MAPIStoreMailVolatileMessage.m +++ b/OpenChange/MAPIStoreMailVolatileMessage.m @@ -943,7 +943,10 @@ MakeMessageBody (NSDictionary *mailProperties, NSDictionary *attachmentParts, NS [mapping registerURL: [self url] withID: mid]; /* synchronise the cache and update the change key with the one provided - by the client */ + by the client. Before doing this, lets issue a noop because of timing + issues with Dovecot. */ + [client noop]; + [(MAPIStoreMailFolder *) container synchroniseCache]; changeKey = [properties objectForKey: MAPIPropertyKey (PR_CHANGE_KEY)]; if (changeKey)