See ChangeLog

Monotone-Parent: 3d7f4c315141a708ca8e3535fb0792843e1b8f9a
Monotone-Revision: 84da44fa0ad497e68382786d494389cd5f8872ce

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-09-15T00:59:36
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2011-09-15 00:59:36 +00:00
parent 6b0a114454
commit c31f10dc76
3 changed files with 79 additions and 24 deletions
+13 -2
View File
@@ -154,8 +154,10 @@ static BOOL debugOn = YES;
- (NGImap4Connection *) imap4Connection
{
NSString *cacheKey;
NSString *cacheKey, *login;
SOGoCache *sogoCache;
if (!imap4)
{
@@ -164,8 +166,17 @@ static BOOL debugOn = YES;
// the cache is shared across OpenChange users and not necessarily
// flushed between requests. This could lead us to using the wrong
// IMAP connection.
//
// We also have a HACK in case self's context doesn't exist, we
// use the container's one.
//
login = [[[self context] activeUser] login];
if (!login)
login = [[[[self container] context] activeUser] login];
cacheKey = [NSString stringWithFormat: @"%@+%@",
[[[self context] activeUser] login],
login,
[[self mailAccountFolder] nameInContainer]];
imap4 = [sogoCache imap4ConnectionForKey: cacheKey];
if (!imap4)