Monotone-Parent: fc3e20fe8fbb851b3907c12e8221e62533f2cea1

Monotone-Revision: c128393b8fefa2da4bb9673a620d1e0baa64a839

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-11-30T21:07:59
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-11-30 21:07:59 +00:00
parent 88cf8acc93
commit 7c27e39fe7
2 changed files with 27 additions and 7 deletions

View File

@ -1,5 +1,11 @@
2010-11-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreMailContext.m
(-getMessageTableChildproperty:atURL:withTag:inFolder:withFID:):
when the property is larger than 4000 bytes, register it in a
"message" dictionary and return MAPI_E_NOT_ENOUGH_MEMORY so that
it can be fetched later via the streaming mechanism.
* OpenChange/MAPIStoreTypes.h (MAPIPropertyNumber): changed the
prototype to use an enum MAPITAGS instead of an int32_t.

View File

@ -208,12 +208,23 @@
result = [[result valueForKey: @"RawResponse"] objectForKey: @"fetch"];
key = [[keys objectAtIndex: 0] objectForKey: @"key"];
content = [[result objectForKey: key] objectForKey: @"data"];
stringContent = [[NSString alloc] initWithData: content
encoding: NSISOLatin1StringEncoding];
if ([content length] > 3999)
{
[self registerValue: content
asProperty: proptag
forURL: childURL];
*data = NULL;
rc = MAPI_E_NOT_ENOUGH_MEMORY;
}
else
{
stringContent = [[NSString alloc] initWithData: content
encoding: NSISOLatin1StringEncoding];
// *data = NULL;
// rc = MAPI_E_NOT_FOUND;
*data = [stringContent asUnicodeInMemCtx: memCtx];
// *data = NULL;
// rc = MAPI_E_NOT_FOUND;
*data = [stringContent asUnicodeInMemCtx: memCtx];
}
}
else
{
@ -248,8 +259,11 @@
content = [[result objectForKey: key] objectForKey: @"data"];
if ([content length] > 3999)
{
[self registerValue: content
asProperty: proptag
forURL: childURL];
*data = NULL;
rc = MAPI_E_NOT_ENOUGH_RESOURCES;
rc = MAPI_E_NOT_ENOUGH_MEMORY;
}
else
*data = [content asBinaryInMemCtx: memCtx];
@ -267,7 +281,7 @@
/* We don't handle any RTF content. */
case PR_RTF_COMPRESSED:
rc = MAPI_E_NOT_FOUND;
rc = MAPI_E_NOT_ENOUGH_MEMORY;
break;
case PR_RTF_IN_SYNC:
*data = MAPIBoolValue (memCtx, NO);