From bb9764bc6bef8633bdeda51860e4cc0db3ad4e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20S=C3=A1ez?= Date: Thu, 28 Aug 2014 04:14:06 +0200 Subject: [PATCH] Revert "oc: cached usercontext updates indexing_context" This reverts commit 0750f64b787db088e944756b66fbd0883cf44cbf. --- OpenChange/MAPIStoreMapping.h | 1 - OpenChange/MAPIStoreMapping.m | 5 ----- OpenChange/MAPIStoreUserContext.h | 2 -- OpenChange/MAPIStoreUserContext.m | 14 +------------- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/OpenChange/MAPIStoreMapping.h b/OpenChange/MAPIStoreMapping.h index 13a8ba768..620112d76 100644 --- a/OpenChange/MAPIStoreMapping.h +++ b/OpenChange/MAPIStoreMapping.h @@ -42,7 +42,6 @@ - (id) initForUsername: (NSString *) username withIndexing: (struct indexing_context *) indexing; -- (void) updateIndexing: (struct indexing_context *) indexing; - (void) increaseUseCount; - (void) decreaseUseCount; diff --git a/OpenChange/MAPIStoreMapping.m b/OpenChange/MAPIStoreMapping.m index 9346b156f..194488bc7 100644 --- a/OpenChange/MAPIStoreMapping.m +++ b/OpenChange/MAPIStoreMapping.m @@ -119,11 +119,6 @@ MAPIStoreMappingKeyFromId (uint64_t idNbr) return self; } -- (void) updateIndexing: (struct indexing_context *) newIndexing -{ - indexing = newIndexing; -} - - (void) dealloc { [username release]; diff --git a/OpenChange/MAPIStoreUserContext.h b/OpenChange/MAPIStoreUserContext.h index 32582271d..f9867d15a 100644 --- a/OpenChange/MAPIStoreUserContext.h +++ b/OpenChange/MAPIStoreUserContext.h @@ -68,8 +68,6 @@ - (id) initWithUsername: (NSString *) newUsername andTDBIndexing: (struct indexing_context *) indexing; -- (void) updateIndexing: (struct indexing_context *) indexing; - - (NSString *) username; - (SOGoUser *) sogoUser; diff --git a/OpenChange/MAPIStoreUserContext.m b/OpenChange/MAPIStoreUserContext.m index 68d063e02..04300fd35 100644 --- a/OpenChange/MAPIStoreUserContext.m +++ b/OpenChange/MAPIStoreUserContext.m @@ -65,14 +65,7 @@ static NSMapTable *contextsTable = nil; id userContext; userContext = [contextsTable objectForKey: username]; - if (userContext) - { - // The indexing_context used when this user context was created - // could had been freed, so we have to update it and use the one - // that we receive as parameter (which is a valid one for sure). - [userContext updateIndexing: indexing]; - } - else + if (!userContext) { userContext = [[self alloc] initWithUsername: username andTDBIndexing: indexing]; @@ -83,11 +76,6 @@ static NSMapTable *contextsTable = nil; return userContext; } -- (void) updateIndexing: (struct indexing_context *) indexing -{ - [mapping updateIndexing: indexing]; -} - - (id) init { if ((self = [super init]))