mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
oc: sync old messages as last resort if there are not in cache
This is happening when the lastModSeq is greater than the modseq from an old message and that message is not in cache. This is used as last resort before crashing and it is only used in objectVersion as it is the first place to call on sync. Other related properties would work.
This commit is contained in:
committed by
Julio García
parent
ef7b919175
commit
a8b716fbaa
@@ -369,6 +369,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||
{
|
||||
uint64_t version = ULLONG_MAX;
|
||||
NSString *uid, *changeNumber;
|
||||
BOOL synced;
|
||||
|
||||
uid = [(MAPIStoreMailFolder *)
|
||||
container messageUIDFromMessageKey: [self nameInContainer]];
|
||||
@@ -387,8 +388,19 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||
[self logWithFormat: @"got one"];
|
||||
else
|
||||
{
|
||||
[self errorWithFormat: @"still nothing. We crash!"];
|
||||
abort();
|
||||
[self warnWithFormat: @"attempting to get change number"
|
||||
@" by synchronising this specific message..."];
|
||||
synced = [(MAPIStoreMailFolder *) container synchroniseCacheForUID: uid];
|
||||
if (synced)
|
||||
{
|
||||
changeNumber = [(MAPIStoreMailFolder *) container
|
||||
changeNumberForMessageUID: uid];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self errorWithFormat: @"still nothing. We crash!"];
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
version = [changeNumber unsignedLongLongValue] >> 16;
|
||||
|
||||
Reference in New Issue
Block a user