Monotone-Parent: ab9f5dfc9882f0fa2e4df964b47cb60942c58c9a

Monotone-Revision: c3b32ea543ff55ff243677d396e4119c69bc0fbc

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-04-19T22:24:03
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-04-19 22:24:03 +00:00
parent f805951939
commit d21ff302a6
2 changed files with 20 additions and 8 deletions

View File

@ -1,5 +1,9 @@
2011-04-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreObject.m (-getProperty:withTag:): compute
the method selector and pass it as argument to the IMP of the
property getter, as would be with any regular method invocation.
* OpenChange/MAPIStoreMailMessage.m (-getPrBody:): no longer check
the size of the returned content, as streams are now handled
internally by OpenChange.

View File

@ -218,23 +218,31 @@ static Class NSExceptionK, MAPIStoreFolderK;
{
MAPIStorePropertyGetter method = NULL;
uint16_t propValue;
SEL methodSel;
const char *propName;
int rc = MAPISTORE_ERR_NOT_FOUND;
propValue = (propTag & 0xffff0000) >> 16;
methodSel = MAPIStoreSelectorForPropertyGetter (propValue);
method = (MAPIStorePropertyGetter) classGetters[propValue];
if (method)
rc = method (self, NULL, data);
rc = method (self, methodSel, data);
else
{
propName = get_proptag_name (propTag);
if (!propName)
propName = "<unknown>";
*data = NULL;
[self warnWithFormat:
@"unimplemented property: %s (0x%.8x) in class '%@'",
propName, propTag, NSStringFromClass (isa)];
if (methodSel)
{
propName = get_proptag_name (propTag);
if (!propName)
propName = "<unknown>";
[self warnWithFormat:
@"unimplemented selector (%@) for %s (0x%.8x)",
NSStringFromSelector (methodSel), propName, propTag];
}
else
[self warnWithFormat: @"unsupported property tag: 0x%.8x", propTag];
}
return rc;