From 381879c77a4a6d76f43ebbeadaad275a2d724c37 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 14 Oct 2010 14:46:34 +0000 Subject: [PATCH] Monotone-Parent: 8e7592262f2159aab15514d3e90f845953e66751 Monotone-Revision: 16d0566b5cbe59d0378166dcfc9fce5ccd83fcb9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-10-14T14:46:34 Monotone-Branch: ca.inverse.sogo --- OpenChange/MAPIStoreMailContext.m | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/OpenChange/MAPIStoreMailContext.m b/OpenChange/MAPIStoreMailContext.m index a30099f30..2a81d75b3 100644 --- a/OpenChange/MAPIStoreMailContext.m +++ b/OpenChange/MAPIStoreMailContext.m @@ -249,8 +249,7 @@ static Class SOGoUserFolderK; PR_SENT_REPRESENTING_NAME_UNICODE, PR_INTERNET_MESSAGE_ID_UNICODE, PR_READ_RECEIPT_REQUESTED }; - union SPropValue_CTR *valueCopyPtr; - union SPropValue_CTR valueCopy; + void *propValue; child = [self lookupObject: childURL]; if (child) @@ -282,25 +281,24 @@ static Class SOGoUserFolderK; max = 9; properties = talloc_zero (memCtx, struct SRow); - properties->cValues = max; + properties->cValues = 0; properties->ulAdrEntryPad = 0; properties->lpProps = talloc_array (properties, struct SPropValue, max); for (count = 0; count < max; count++) { - properties->lpProps[count].ulPropTag = tags[count]; - if ([self getMessageTableChildproperty: &valueCopyPtr + if ([self getMessageTableChildproperty: &propValue atURL: childURL withTag: tags[count] inFolder: nil withFID: 0] == MAPI_E_SUCCESS) { - valueCopy = *valueCopyPtr; - talloc_free (valueCopyPtr); + set_SPropValue_proptag (&(properties->lpProps[properties->cValues]), + tags[count], + propValue); + properties->cValues++; + // talloc_free (propValue); } - else - valueCopy.d = 0; - properties->lpProps[count].value = valueCopy; } msg->properties = properties;