From 9a14c03da204198026f0683079ad973864bd17d6 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 12 Aug 2011 14:59:43 +0000 Subject: [PATCH] Monotone-Parent: e7b5f0b2b458927d09012056b19e2285aaa49603 Monotone-Revision: 93c2d10f4925c2d91f6dce75efa53e3cfe8fa5f8 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-08-12T14:59:43 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ OpenChange/MAPIStoreGCSMessageTable.m | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 459f0655d..d6f25003f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-08-12 Wolfgang Sourdeau + * OpenChange/MAPIStoreGCSMessageTable.m + (-evaluatePropertyRestriction:intoQualifier:): create a local + talloc context and free it at the end when generating a new date + restriction. + * OpenChange/plreader.m (-displayKey:withIndentation:): display alternative hex representation of the keys. diff --git a/OpenChange/MAPIStoreGCSMessageTable.m b/OpenChange/MAPIStoreGCSMessageTable.m index 7e2baa0c9..02abb838e 100644 --- a/OpenChange/MAPIStoreGCSMessageTable.m +++ b/OpenChange/MAPIStoreGCSMessageTable.m @@ -37,7 +37,6 @@ #import "MAPIStoreTypes.h" #import "MAPIStoreGCSFolder.h" -#import "NSAutoreleasePool+MAPIStore.h" #import "MAPIStoreGCSMessageTable.h" @@ -53,6 +52,7 @@ } - (struct mapi_SPropertyRestriction *) _fixedDatePropertyRestriction: (struct mapi_SPropertyRestriction *) res + inMemCtx: (TALLOC_CTX *) memCtx { struct mapi_SPropertyRestriction *translatedRes; NSCalendarDate *dateValue; @@ -84,6 +84,7 @@ NSString *property; NSNumber *lastModified; MAPIRestrictionState rc; + TALLOC_CTX *memCtx = NULL; if (res->ulPropTag == PR_CHANGE_NUM) { @@ -119,8 +120,9 @@ if ((res->ulPropTag & 0xffff) == PT_SYSTIME) { - res = [self _fixedDatePropertyRestriction: res]; - NSAutoreleaseTallocPointer (res); + memCtx = talloc_zero (NULL, TALLOC_CTX); + res = [self _fixedDatePropertyRestriction: res + inMemCtx: memCtx]; } value = NSObjectFromMAPISPropValue (&res->lpProp); @@ -134,7 +136,9 @@ operatorSelector: operator value: value]; [*qualifier autorelease]; - + if (memCtx) + talloc_free (memCtx); + rc = MAPIRestrictionStateNeedsEval; } else