From a73df96b78b5824a3fa81231f94b1c7125d6c1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Amor=20Garc=C3=ADa?= Date: Mon, 16 Nov 2015 13:56:04 +0100 Subject: [PATCH] [MAPIStoreGCSMessage getPidTagChangeKey:inMemCtx:] return on error This method aborted when no PidTagChangeKey was found and the new flag was not set. Now it returns MAPISTORE_ERR_NOT_FOUND. --- OpenChange/MAPIStoreGCSMessage.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/OpenChange/MAPIStoreGCSMessage.m b/OpenChange/MAPIStoreGCSMessage.m index 747bb783a..f9d3a16d8 100644 --- a/OpenChange/MAPIStoreGCSMessage.m +++ b/OpenChange/MAPIStoreGCSMessage.m @@ -140,9 +140,16 @@ [parentFolder synchroniseCache]; changeKey = [parentFolder changeKeyForMessageWithKey: nameInContainer]; } - if (!changeKey) - abort (); - *data = [changeKey asBinaryInMemCtx: memCtx]; + if (changeKey) + *data = [changeKey asBinaryInMemCtx: memCtx]; + else + { + [self warnWithFormat: @"No change key for %@ in folder %@", + nameInContainer, + [parentFolder url] + ]; + rc = MAPISTORE_ERR_NOT_FOUND; + } } return rc;