From 838ae8995ff592d4526194a37c8f5554082cbca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20S=C3=A1ez?= Date: Mon, 29 Dec 2014 19:20:16 +0100 Subject: [PATCH] oc: ignore unhandled properties instead of abort When setting a row with properties not handled right now, ignore them like they were never there instead of abort() --- OpenChange/MAPIStoreObject.m | 3 +++ OpenChange/MAPIStoreTypes.m | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenChange/MAPIStoreObject.m b/OpenChange/MAPIStoreObject.m index 1d468915c..1c85caf04 100644 --- a/OpenChange/MAPIStoreObject.m +++ b/OpenChange/MAPIStoreObject.m @@ -256,6 +256,9 @@ static Class NSExceptionK, MAPIStoreFolderK; { cValue = aRow->lpProps + counter; value = NSObjectFromSPropValue (cValue); + if (value == nil) + continue; + switch (cValue->ulPropTag & 0xffff) { case PT_STRING8: diff --git a/OpenChange/MAPIStoreTypes.m b/OpenChange/MAPIStoreTypes.m index f8e32c824..01b650463 100644 --- a/OpenChange/MAPIStoreTypes.m +++ b/OpenChange/MAPIStoreTypes.m @@ -154,8 +154,7 @@ NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value) // #define PT_I8 0x14 // #define PT_SRESTRICT 0xFD // #define PT_ACTIONS 0xFE - result = [NSNull null]; - abort(); + result = nil; NSLog (@"%s: object type not handled: %d (0x%.4x)", __PRETTY_FUNCTION__, valueType, valueType); } @@ -250,8 +249,7 @@ NSObjectFromSPropValue (const struct SPropValue *value) // #define PT_I8 0x14 // #define PT_SRESTRICT 0xFD // #define PT_ACTIONS 0xFE - result = [NSNull null]; - abort(); + result = nil; NSLog (@"%s: object type not handled: %d (0x%.4x)", __PRETTY_FUNCTION__, valueType, valueType); }