mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
See ChangeLog
Monotone-Parent: 5475eac0e45624fa60269bb388e23e6e2dc89bd8 Monotone-Revision: 53a3680b094640a96987cce96326daad38a619e0 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-12-25T22:52:52 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-12-25 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Tools/SOGoToolBackup.m (-fetchUserIDs:):
|
||||
We now use a local autorelease pool and flush
|
||||
it after every 100 requests to the LDAP (or
|
||||
other source type) server.
|
||||
|
||||
2009-12-23 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalView.m
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSError.h>
|
||||
#import <Foundation/NSFileManager.h>
|
||||
#import <Foundation/NSString.h>
|
||||
@@ -118,6 +119,7 @@
|
||||
|
||||
- (BOOL) fetchUserIDs: (NSArray *) users
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
SOGoUserManager *lm;
|
||||
NSDictionary *infos;
|
||||
NSString *user;
|
||||
@@ -125,6 +127,8 @@
|
||||
int count, max;
|
||||
|
||||
lm = [SOGoUserManager sharedUserManager];
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
max = [users count];
|
||||
user = [users objectAtIndex: 0];
|
||||
if (max == 1 && [user isEqualToString: @"ALL"])
|
||||
@@ -134,6 +138,12 @@
|
||||
allUsers = [NSMutableArray array];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
if (count > 0 && count%100 == 0)
|
||||
{
|
||||
DESTROY(pool);
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
}
|
||||
|
||||
user = [users objectAtIndex: count];
|
||||
infos = [lm contactInfosForUserWithUIDorEmail: user];
|
||||
if (infos)
|
||||
@@ -144,6 +154,7 @@
|
||||
}
|
||||
|
||||
ASSIGN (userIDs, [allUsers objectsForKey: @"c_uid" notFoundMarker: nil]);
|
||||
DESTROY(pool);
|
||||
|
||||
return ([userIDs count] > 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user