From f6d1a37127eea974a3a64c1cea138b796d62eaa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20S=C3=A1ez?= Date: Tue, 24 Dec 2013 11:03:03 +0100 Subject: [PATCH] use properly get_uri function and check ret value --- OpenChange/MAPIStoreMapping.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenChange/MAPIStoreMapping.m b/OpenChange/MAPIStoreMapping.m index 2781aa814..67a6c132a 100644 --- a/OpenChange/MAPIStoreMapping.m +++ b/OpenChange/MAPIStoreMapping.m @@ -129,9 +129,13 @@ MAPIStoreMappingKeyFromId (uint64_t idNbr) - (NSString *) urlFromID: (uint64_t) idNbr { char* url = NULL; + enum mapistore_error ret; + bool soft_delete = false; - indexing->get_uri(indexing, [username UTF8String], - memCtx, idNbr, &url, false); + ret = indexing->get_uri(indexing, [username UTF8String], + memCtx, idNbr, &url, &soft_delete); + if (ret != MAPISTORE_SUCCESS) + return NULL; NSString *res = [[[NSString alloc] initWithUTF8String:url] autorelease]; talloc_free(url);