diff --git a/ChangeLog b/ChangeLog index 282f70396..aa69a75d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2011-09-27 Wolfgang Sourdeau + + * OpenChange/MAPIStoreSOGo.m (sogo_folder_move_copy_messages): + added the "target_change_keys" parameter. + + * OpenChange/MAPIStoreFolder.m + (-moveCopyMessagesWithMID:fromFolder:withMID:wantCopy:): ensure + the message URL exists in the MAPIStoreMapping, otherwise fail + with MAPISTORE_ERR_NOT_FOUND, to avoid a crash. Passe the target + changeKey as property to the new message. + + * OpenChange/MAPIStoreFSMessage.m (-objectVersion): return + 0xff...fff when "version" does not exist in the object properties. + 2011-09-27 Francis Lachapelle * SoObjects/SOGo/SOGoUserDefaults.m (-setBusyOffHours): new setter @@ -13,19 +27,6 @@ (-fetchFreeBusyInfosFrom:to:): add off-hours if defaults SOGoBusyOffHours is true. -2011-09-27 Wolfgang Sourdeau - - * OpenChange/MAPIStoreSOGo.m (sogo_folder_move_copy_messages): - added the "target_change_keys" parameter. - - * OpenChange/MAPIStoreFolder.m - (-moveCopyMessagesWithMID:fromFolder:withMID:wantCopy:): ensure - the message URL exists in the MAPIStoreMapping, otherwise fail - with MAPISTORE_ERR_NOT_FOUND, to avoid a crash. - - * OpenChange/MAPIStoreFSMessage.m (-objectVersion): return - 0xff...fff when "version" does not exist in the object properties. - 2011-09-26 Wolfgang Sourdeau * OpenChange/MAPIStoreFolder.m diff --git a/OpenChange/MAPIStoreFolder.h b/OpenChange/MAPIStoreFolder.h index cf6f3e951..899c75086 100644 --- a/OpenChange/MAPIStoreFolder.h +++ b/OpenChange/MAPIStoreFolder.h @@ -124,6 +124,7 @@ andCount: (uint32_t) count fromFolder: (MAPIStoreFolder *) sourceFolder withMIDs: (uint64_t *) targetMids + andChangeKeys: (struct Binary_r **) targetChangeKeys wantCopy: (uint8_t) want_copy; - (int) getDeletedFMIDs: (struct I8Array_r **) fmidsPtr diff --git a/OpenChange/MAPIStoreFolder.m b/OpenChange/MAPIStoreFolder.m index 354115c88..2caec5e65 100644 --- a/OpenChange/MAPIStoreFolder.m +++ b/OpenChange/MAPIStoreFolder.m @@ -599,7 +599,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe aRow = talloc_zero (memCtx, struct SRow); aRow->lpProps = talloc_array (aRow, struct SPropValue, 65535); - + for (count = 0; count < availableProps->cValues; count++) { propTag = availableProps->aulPropTag[count]; @@ -616,6 +616,12 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe } } + if (targetChangeKey) + { + set_SPropValue_proptag(&aRow->lpProps[aRow->cValues], PR_CHANGE_KEY, targetChangeKey); + aRow->cValues++; + } + rc = [self createMessage: &destMsg withMID: targetMid isAssociated: [sourceMsg isKindOfClass: MAPIStoreFAIMessageK]]; if (rc != MAPISTORE_SUCCESS)