Monotone-Parent: 9a2499685fbc7c107c6a8a04f34c7435343e64f4
Monotone-Revision: 24436aa1f7c157e01afd314ceccdf0d59418faa7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-08-12T18:40:07 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
90b11f541e
commit
efdee42eba
|
@ -1,5 +1,9 @@
|
||||||
2011-08-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2011-08-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreGCSMessage.m (-objectVersion): ensure that a
|
||||||
|
change number is available when the message is "not new", but
|
||||||
|
resynchronise the cache in doing so.
|
||||||
|
|
||||||
* OpenChange/MAPIStoreSOGo.m (sogo_table_handle_destructor): added
|
* OpenChange/MAPIStoreSOGo.m (sogo_table_handle_destructor): added
|
||||||
new backend operation.
|
new backend operation.
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSValue.h>
|
#import <Foundation/NSValue.h>
|
||||||
|
#import <NGExtensions/NSObject+Logs.h>
|
||||||
#import <SOGo/SOGoContentObject.h>
|
#import <SOGo/SOGoContentObject.h>
|
||||||
|
|
||||||
#import "MAPIStoreGCSFolder.h"
|
#import "MAPIStoreGCSFolder.h"
|
||||||
|
@ -48,12 +49,28 @@
|
||||||
uint64_t version = 0xffffffffffffffffLL;
|
uint64_t version = 0xffffffffffffffffLL;
|
||||||
NSNumber *changeNumber;
|
NSNumber *changeNumber;
|
||||||
|
|
||||||
changeNumber = [(MAPIStoreGCSFolder *) container
|
if (![sogoObject isNew])
|
||||||
changeNumberForMessageWithKey: [self nameInContainer]];
|
{
|
||||||
if (changeNumber)
|
changeNumber = [(MAPIStoreGCSFolder *) container
|
||||||
version = [changeNumber unsignedLongLongValue] >> 16;
|
changeNumberForMessageWithKey: [self nameInContainer]];
|
||||||
else if (![sogoObject isNew])
|
if (!changeNumber)
|
||||||
abort ();
|
{
|
||||||
|
[self warnWithFormat: @"attempting to get change number"
|
||||||
|
@" by synchronising folder..."];
|
||||||
|
[(MAPIStoreGCSFolder *) container synchroniseCache];
|
||||||
|
changeNumber = [(MAPIStoreGCSFolder *) container
|
||||||
|
changeNumberForMessageWithKey: [self nameInContainer]];
|
||||||
|
|
||||||
|
if (changeNumber)
|
||||||
|
[self logWithFormat: @"got one"];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self errorWithFormat: @"still nothing. We crash!"];
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
version = [changeNumber unsignedLongLongValue] >> 16;
|
||||||
|
}
|
||||||
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue