diff --git a/ChangeLog b/ChangeLog index 4c43ab951..5768a7fde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * OpenChange/MAPIStoreFolder.m (-createFolder:withRow:andFID:): fixed referencing of resulting folder. (+initialize): fixed initialization of MAPIStoreFAIMessageK. + (-getTable:andRowCount:tableType:andHandleId:): properly return + MAPISTORE_ERR_NOT_FOUND for tables that are not handled by the + folder. 2011-07-14 Wolfgang Sourdeau diff --git a/OpenChange/MAPIStoreFolder.m b/OpenChange/MAPIStoreFolder.m index 24ddc5dc5..7e7d7173d 100644 --- a/OpenChange/MAPIStoreFolder.m +++ b/OpenChange/MAPIStoreFolder.m @@ -502,6 +502,7 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe tableType: (uint8_t) tableType andHandleId: (uint32_t) handleId { + int rc = MAPISTORE_SUCCESS; MAPIStoreTable *table; if (tableType == MAPISTORE_MESSAGE_TABLE) @@ -516,11 +517,16 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe [NSException raise: @"MAPIStoreIOException" format: @"unsupported table type: %d", tableType]; } - [table setHandleId: handleId]; - *tablePtr = table; - *countPtr = [[table childKeys] count]; + if (table) + { + [table setHandleId: handleId]; + *tablePtr = table; + *countPtr = [[table childKeys] count]; + } + else + rc = MAPISTORE_ERR_NOT_FOUND; - return MAPISTORE_SUCCESS; + return rc; } - (int) setProperties: (struct SRow *) aRow