Merge pull request #64 from Zentyal/ejhernandez/store-change-number-subfolders-cache

Store changeNumber maps with modseq in cache for subfolders
This commit is contained in:
Jesús García Sáez
2014-12-03 16:05:51 +01:00
3 changed files with 17 additions and 4 deletions

View File

@@ -682,9 +682,9 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
{
/* This method should be called whenever something has changed on the folder.
Then we will perform two actions:
1 - Update its PidTagChangeNumber property.
1 - Update the PidTagChangeNumber property of the root container.
2 - Store relationship PidTagChangenumber with lastModseq value on the
mapping given as parameter */
mapping given as parameter for this folder */
uint64_t *current_cn;
struct SRow row;
struct SPropValue prop;
@@ -699,10 +699,11 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
prop.value.d = 0; // It doesn't matter, it will be autogenerated
row.lpProps = ∝
/* We are doing a "touch" operation to update change number of this folder */
/* We are doing a "touch" operation to update change number of the root container.
We get the root container as it has the properties in the OpenChange DB */
username = [[self context] connectionInfo]->username;
oc_ctx = [[self context] connectionInfo]->oc_ctx;
fid = [self objectId];
fid = [[self rootContainer] objectId];
retval = openchangedb_set_folder_properties(oc_ctx, username, fid, &row);
if (retval != MAPI_E_SUCCESS)
{