use properly get_uri function and check ret value

This commit is contained in:
Jesús García Sáez
2013-12-24 11:03:03 +01:00
committed by Julio García
parent 2aa71cc8a3
commit f6d1a37127

View File

@@ -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);