mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 14:28:52 +00:00
Monotone-Parent: 6cab0a382f42089e9c8aa95c4ce8740cabe5cd1c
Monotone-Revision: 075d74e27ae04f20b3c4704bd989f61c0e07ddf6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-10-17T15:29:14 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2011-10-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMapping.m (-initForUsername:withIndexing:):
|
||||
attach the struct tdb_wrap *indexing to a new memCtx ivar, in
|
||||
order to make sure its value is retained until the release of the
|
||||
mapping instance.
|
||||
|
||||
2011-10-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreGCSMessageTable.m
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
@interface MAPIStoreMapping : NSObject
|
||||
{
|
||||
void *memCtx;
|
||||
NSString *username;
|
||||
struct tdb_wrap *indexing;
|
||||
NSMutableDictionary *mapping; /* FID/MID -> url */
|
||||
|
||||
@@ -112,6 +112,7 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
memCtx = talloc_zero (NULL, TALLOC_CTX);
|
||||
mapping = [NSMutableDictionary new];
|
||||
reverseMapping = [NSMutableDictionary new];
|
||||
indexing = NULL;
|
||||
@@ -153,6 +154,7 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
{
|
||||
ASSIGN (username, newUsername);
|
||||
indexing = newIndexing;
|
||||
(void) talloc_reference (memCtx, newIndexing);
|
||||
tdb_traverse_read (indexing->tdb, MAPIStoreMappingTDBTraverse, mapping);
|
||||
keys = [mapping allKeys];
|
||||
max = [keys count];
|
||||
@@ -175,6 +177,7 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
[username release];
|
||||
[mapping release];
|
||||
[reverseMapping release];
|
||||
talloc_free (memCtx);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user