Avoid type-issues generating wrong GlobCnt - leading to OpenChange crashes during the sync process.

This commit is contained in:
Ludovic Marcotte
2013-09-18 14:03:07 -04:00
parent 6d93db96e4
commit 7ddc1b9e2d
3 changed files with 10 additions and 2 deletions
+3 -1
View File
@@ -259,7 +259,6 @@ static Class NSNumberK;
}
}
*/
- (void) _setChangeKey: (NSData *) changeKey
forMessageEntry: (NSMutableDictionary *) messageEntry
inChangeListOnly: (BOOL) inChangeListOnly
@@ -462,6 +461,9 @@ static Class NSNumberK;
[messageEntry setObject: changeNumber forKey: @"version"];
newChangeNum = [changeNumber unsignedLongLongValue];
// A GLOBCNT structure is a 6-byte global namespace counter,
// we strip the first 2 bytes. The first two bytes is the ReplicaId
changeKey = [self getReplicaKeyFromGlobCnt: newChangeNum >> 16];
[self _setChangeKey: changeKey forMessageEntry: messageEntry
inChangeListOnly: NO];