Monotone-Parent: 6bb1bd2b9a63daae8f56da56b2ba72ac8bad2d3e

Monotone-Revision: a84224f7e18c7678f6ed4be61800899d8fb9286d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-09-23T19:27:21
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-09-23 19:27:21 +00:00
parent a0112fdbf8
commit fcad5d186b
3 changed files with 28 additions and 4 deletions

View File

@ -1,5 +1,13 @@
2011-09-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreGCSMessage.m (-getPrChangeKey:inMemCtx:):
first force a synchronisation of the parent cache if the change key
cannot be retrieved and invoke abort if the change key is still
not available afterwards.
* OpenChange/MAPIStoreMailMessage.m (-getPrChangeKey:inMemCtx:):
same as above.
* OpenChange/MAPIStoreMailFolder.m (-lastMessageModificationTime):
invoke "synchroniseCache" in order to make sure we return the real
last modification time.

View File

@ -52,13 +52,21 @@
{
int rc = MAPISTORE_SUCCESS;
NSData *changeKey;
MAPIStoreGCSFolder *parentFolder;
NSString *nameInContainer;
if (isNew)
rc = MAPISTORE_ERR_NOT_FOUND;
else
{
changeKey = [(MAPIStoreGCSFolder *)[self container]
changeKeyForMessageWithKey: [self nameInContainer]];
parentFolder = (MAPIStoreGCSFolder *)[self container];
nameInContainer = [self nameInContainer];
changeKey = [parentFolder changeKeyForMessageWithKey: nameInContainer];
if (!changeKey)
{
[parentFolder synchroniseCache];
changeKey = [parentFolder changeKeyForMessageWithKey: nameInContainer];
}
if (!changeKey)
abort ();
*data = [changeKey asBinaryInMemCtx: memCtx];

View File

@ -284,13 +284,21 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
{
int rc = MAPISTORE_SUCCESS;
NSData *changeKey;
MAPIStoreMailFolder *parentFolder;
NSString *nameInContainer;
if (isNew)
rc = MAPISTORE_ERR_NOT_FOUND;
else
{
changeKey = [(MAPIStoreMailFolder *)[self container]
changeKeyForMessageWithKey: [self nameInContainer]];
parentFolder = (MAPIStoreMailFolder *)[self container];
nameInContainer = [self nameInContainer];
changeKey = [parentFolder changeKeyForMessageWithKey: nameInContainer];
if (!changeKey)
{
[parentFolder synchroniseCache];
changeKey = [parentFolder changeKeyForMessageWithKey: nameInContainer];
}
if (!changeKey)
abort ();
*data = [changeKey asBinaryInMemCtx: memCtx];