diff --git a/ChangeLog b/ChangeLog index e01ddbff4..2e59043a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-14 Wolfgang Sourdeau + * OpenChange/NSArray+MAPIStore.m (-asFoldersListInCtx:) removed + useless method. + (-asArrayOfUnicodeStringsInCtx:) properly connect the talloc + hierarchy nodes. + * OpenChange/MAPIStoreSOGo.m: adapted to latest mapistore_backend nomenclature. diff --git a/OpenChange/NSArray+MAPIStore.h b/OpenChange/NSArray+MAPIStore.h index e619b6a81..4d9a006a8 100644 --- a/OpenChange/NSArray+MAPIStore.h +++ b/OpenChange/NSArray+MAPIStore.h @@ -27,7 +27,6 @@ @interface NSArray (MAPIStoreFolders) -- (struct indexing_folders_list *) asFoldersListInCtx: (void *) memCtx; - (struct mapi_SPLSTRArrayW *) asArrayOfUnicodeStringsInCtx: (void *) memCtx; @end diff --git a/OpenChange/NSArray+MAPIStore.m b/OpenChange/NSArray+MAPIStore.m index 7ee9264e8..4888c6846 100644 --- a/OpenChange/NSArray+MAPIStore.m +++ b/OpenChange/NSArray+MAPIStore.m @@ -32,23 +32,6 @@ @implementation NSArray (MAPIStoreFolders) -- (struct indexing_folders_list *) asFoldersListInCtx: (void *) memCtx -{ - struct indexing_folders_list *flist; - NSInteger count, max; - - max = [self count]; - - flist = talloc_zero(memCtx, struct indexing_folders_list); - flist->folderID = talloc_array(flist, uint64_t, max); - flist->count = max; - - for (count = 0; count < max; count++) - *(flist->folderID + count) = [[self objectAtIndex: count] unsignedLongLongValue]; - - return flist; -} - - (struct mapi_SPLSTRArrayW *) asArrayOfUnicodeStringsInCtx: (void *) memCtx { struct mapi_SPLSTRArrayW *list; @@ -58,10 +41,10 @@ list = talloc_zero(memCtx, struct mapi_SPLSTRArrayW); list->cValues = max; - list->strings = talloc_array(memCtx, struct mapi_LPWSTR, max); + list->strings = talloc_array(list, struct mapi_LPWSTR, max); for (count = 0; count < max; count++) - (list->strings + count)->lppszW = [[self objectAtIndex: count] asUnicodeInMemCtx: memCtx]; + (list->strings + count)->lppszW = [[self objectAtIndex: count] asUnicodeInMemCtx: list->strings]; return list; }