diff --git a/ChangeLog b/ChangeLog index 04ce53b70..dbdffd6a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-07-12 Wolfgang Sourdeau + + * OpenChange/MAPIStoreTable.m + (-getRow:withRowID:andQueryType:inMemCtx:): slight change of + prototype in order to leave the structure initialization to the + backend. + 2011-07-11 Francis Lachapelle * UI/Scheduler/UIxAppointmentEditor.m diff --git a/OpenChange/MAPIStoreSOGo.m b/OpenChange/MAPIStoreSOGo.m index 9ca76cd8d..4737ef46f 100644 --- a/OpenChange/MAPIStoreSOGo.m +++ b/OpenChange/MAPIStoreSOGo.m @@ -1086,7 +1086,7 @@ sogo_pocop_set_table_sort_order (void *table_object, struct SSortOrderSet *sort_ static int sogo_pocop_get_table_row (void *table_object, TALLOC_CTX *mem_ctx, enum table_query_type query_type, uint32_t row_id, - struct mapistore_property_data *data) + struct mapistore_property_data **data) { struct MAPIStoreTallocWrapper *wrapper; NSAutoreleasePool *pool; diff --git a/OpenChange/MAPIStoreTable.h b/OpenChange/MAPIStoreTable.h index 7db3c3b06..e1bc3a7f3 100644 --- a/OpenChange/MAPIStoreTable.h +++ b/OpenChange/MAPIStoreTable.h @@ -92,7 +92,7 @@ typedef enum { - (void) setRestrictions: (const struct mapi_SRestriction *) res; - (int) setColumns: (enum MAPITAGS *) newColumns withCount: (uint16_t) newColumCount; -- (int) getRow: (struct mapistore_property_data *) data +- (int) getRow: (struct mapistore_property_data **) dataP withRowID: (uint32_t) rowId andQueryType: (enum table_query_type) queryType inMemCtx: (TALLOC_CTX *) memCtx; diff --git a/OpenChange/MAPIStoreTable.m b/OpenChange/MAPIStoreTable.m index 26c4b7ae0..28b54b41e 100644 --- a/OpenChange/MAPIStoreTable.m +++ b/OpenChange/MAPIStoreTable.m @@ -803,7 +803,7 @@ static Class NSDataK, NSStringK; return child; } -- (int) getRow: (struct mapistore_property_data *) data +- (int) getRow: (struct mapistore_property_data **) dataP withRowID: (uint32_t) rowId andQueryType: (enum table_query_type) queryType inMemCtx: (TALLOC_CTX *) memCtx @@ -811,16 +811,19 @@ static Class NSDataK, NSStringK; NSUInteger count; MAPIStoreObject *child; enum MAPISTATUS rc; + struct mapistore_property_data *rowData; child = [self childAtRowID: rowId forQueryType: queryType]; if (child) { - rc = MAPI_E_SUCCESS; + rowData = talloc_array(memCtx, struct mapistore_property_data, columnsCount); for (count = 0; count < columnsCount; count++) - data[count].error = [child getProperty: &data[count].data - withTag: columns[count] - inMemCtx: memCtx]; + rowData[count].error = [child getProperty: &rowData[count].data + withTag: columns[count] + inMemCtx: memCtx]; + *datap = rowData; + rc = MAPI_E_SUCCESS; } else rc = MAPI_E_INVALID_OBJECT;