mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-13 10:51:24 +00:00
Monotone-Parent: c852be1d5a70f9aa1ee5a5b4e45b30bd3ef86939
Monotone-Revision: 1ed44d9759e8a5f57b9c55905872081bf8fec785 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-06-03T23:53:30 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -70,8 +70,8 @@
|
||||
|
||||
static Class NSDataK, NSStringK, MAPIStoreFAIMessageK;
|
||||
|
||||
static MAPIStoreMapping *mapping;
|
||||
static NSMutableDictionary *contextClassMapping;
|
||||
static NSMutableDictionary *userMAPIStoreMapping;
|
||||
|
||||
static void *ldbCtx = NULL;
|
||||
|
||||
@@ -86,8 +86,6 @@ static void *ldbCtx = NULL;
|
||||
NSStringK = [NSString class];
|
||||
MAPIStoreFAIMessageK = [MAPIStoreFAIMessage class];
|
||||
|
||||
mapping = [MAPIStoreMapping sharedMapping];
|
||||
|
||||
contextClassMapping = [NSMutableDictionary new];
|
||||
classes = GSObjCAllSubclassesOfClass (self);
|
||||
max = [classes count];
|
||||
@@ -103,6 +101,8 @@ static void *ldbCtx = NULL;
|
||||
NSStringFromClass (currentClass), moduleName);
|
||||
}
|
||||
}
|
||||
|
||||
userMAPIStoreMapping = [NSMutableDictionary new];
|
||||
}
|
||||
|
||||
static inline MAPIStoreContext *
|
||||
@@ -209,7 +209,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||
inMemCtx: (struct mapistore_context *) newMemCtx
|
||||
{
|
||||
struct loadparm_context *lpCtx;
|
||||
MAPIStoreMapping *mapping;
|
||||
NSString *username;
|
||||
|
||||
if ((self = [self init]))
|
||||
{
|
||||
@@ -221,7 +221,15 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||
|
||||
ASSIGN (contextUrl, newUrl);
|
||||
|
||||
mapping = [MAPIStoreMapping sharedMapping];
|
||||
username = [NSString stringWithUTF8String: newConnInfo->username];
|
||||
mapping = [userMAPIStoreMapping objectForKey: username];
|
||||
if (!mapping)
|
||||
{
|
||||
[self logWithFormat: @"generating mapping of ids for user '%@'",
|
||||
username];
|
||||
mapping = [MAPIStoreMapping mappingWithIndexing: newConnInfo->indexing];
|
||||
[userMAPIStoreMapping setObject: mapping forKey: username];
|
||||
}
|
||||
if (![mapping urlFromID: newFid])
|
||||
[mapping registerURL: [newUrl absoluteString]
|
||||
withID: newFid];
|
||||
@@ -254,6 +262,11 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||
return woContext;
|
||||
}
|
||||
|
||||
- (MAPIStoreMapping *) mapping
|
||||
{
|
||||
return mapping;
|
||||
}
|
||||
|
||||
- (void) setAuthenticator: (MAPIStoreAuthenticator *) newAuthenticator
|
||||
{
|
||||
ASSIGN (authenticator, newAuthenticator);
|
||||
@@ -1332,8 +1345,6 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||
uint64_t mappingId;
|
||||
uint32_t contextId;
|
||||
|
||||
mapping = [MAPIStoreMapping sharedMapping];
|
||||
|
||||
if (key)
|
||||
childURL = [NSString stringWithFormat: @"%@%@", folderURL, key];
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user