See ChangeLog

Monotone-Parent: a4f6c377a41454eb21ed5b253cb7d07fc2c1a55e
Monotone-Revision: 3c7106a946b0d9786d46c4f0c0a7e5bc1e5f8684

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-12-29T17:50:48
This commit is contained in:
Ludovic Marcotte
2011-12-29 17:50:48 +00:00
parent 5799804274
commit 516dcdb255
9 changed files with 74 additions and 18 deletions
+9
View File
@@ -3,6 +3,7 @@
* Copyright (C) 2007-2011 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Ludovic Marcotte <lmarcotte@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,6 +22,7 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSValue.h>
@@ -122,10 +124,16 @@
SOGoUserManager *userManager;
NSDictionary *folderData;
NSMutableArray *folders;
NSAutoreleasePool *pool;
folders = [NSMutableArray array];
while ((currentFolder = [rawFolders nextObject]))
{
// Using a local pool to avoid using too many file descriptors. This could
// happen with tons of mailboxes under "Other Users" as LDAP connections
// are never reused and "autoreleased" at the end. This loop would consume
// lots of LDAP connections during its execution.
pool = [[NSAutoreleasePool alloc] init];
currentFolderType = [self _folderType: currentFolder];
// We translate the "Other Users" and "Shared Folders" namespaces.
@@ -169,6 +177,7 @@
currentDisplayName, @"displayName",
nil];
[folders addObject: folderData];
[pool release];
}
return folders;