Monotone-Parent: 513390dbae4bee1883ba285606980dafededd7e9
Monotone-Revision: c91ef93c746474269b965e1900b046e24a267f6d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-04-28T17:58:19 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
31139cacb0
commit
273db45464
|
@ -1,5 +1,10 @@
|
|||
2010-04-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Tools/sogo-tool.m (setupUserDefaults): new function that sets up
|
||||
a few parameters on the user defaults. Notably, we override the
|
||||
values for "SOGoLDAPQueryLimit" and "SOGoLDAPQueryTimeout" so that
|
||||
they do not limit the amount of records that can be exported.
|
||||
|
||||
* Tools/SOGoToolBackup.m (-proceed): we empty the autorelease pool
|
||||
every 10 iterations to avoid an excess of unreleased LDAP
|
||||
connections.
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#import <Foundation/NSProcessInfo.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import "SOGoTool.h"
|
||||
|
||||
|
@ -214,6 +215,21 @@
|
|||
|
||||
@end
|
||||
|
||||
static void
|
||||
setupUserDefaults (NSUserDefaults *ud)
|
||||
{
|
||||
NSMutableDictionary *defaultsOverrides;
|
||||
|
||||
[ud registerDefaults: [ud persistentDomainForName: @"sogod"]];
|
||||
defaultsOverrides = [NSMutableDictionary new];
|
||||
[defaultsOverrides setObject: [NSNumber numberWithInt: 0]
|
||||
forKey: @"SOGoLDAPQueryLimit"];
|
||||
[defaultsOverrides setObject: [NSNumber numberWithInt: 0]
|
||||
forKey: @"SOGoLDAPQueryTimeout"];
|
||||
[ud registerDefaults: defaultsOverrides];
|
||||
[defaultsOverrides release];
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv, char **env)
|
||||
{
|
||||
|
@ -227,7 +243,7 @@ main (int argc, char **argv, char **env)
|
|||
pool = [NSAutoreleasePool new];
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
[ud addSuiteNamed: @"sogod"];
|
||||
setupUserDefaults (ud);
|
||||
|
||||
if ([ud objectForKey: @"SOGoUserSources"])
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue