Skip to content

Commit

Permalink
Use SOGoSystemDefaults in all tools
Browse files Browse the repository at this point in the history
sogo-ealarms-notify and sogo-slapd-sockd will now be able to use sogo.conf
Fixes #2226
  • Loading branch information
Jean Raby committed Feb 8, 2013
1 parent 8981dcd commit 4952ff7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions Tools/sogo-ealarms-notify.m
Expand Up @@ -23,28 +23,29 @@
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSUserDefaults.h>

#import <SOGo/SOGoSystemDefaults.h>

#import "SOGoEAlarmsNotifier.h"

int
main (int argc, char **argv, char **env)
{
NSAutoreleasePool *pool;
NSUserDefaults *ud;
SOGoEAlarmsNotifier *notifier;
SOGoSystemDefaults *sogoDefaults;
int rc;

rc = 0;

pool = [NSAutoreleasePool new];

ud = [NSUserDefaults standardUserDefaults];
[ud addSuiteNamed: @"sogod"];
sogoDefaults = [SOGoSystemDefaults sharedSystemDefaults];

if ([ud objectForKey: @"SOGoEnableEMailAlarms"])
if ([sogoDefaults objectForKey: @"SOGoEnableEMailAlarms"])
{
notifier = [SOGoEAlarmsNotifier new];
if (![notifier run])
rc = -1;
rc = -1;
[notifier release];
}
else
Expand Down
6 changes: 3 additions & 3 deletions Tools/sogo-slapd-sockd.m
Expand Up @@ -23,22 +23,22 @@
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSUserDefaults.h>

#import <SOGo/SOGoSystemDefaults.h>

#import "SOGoSockD.h"

int
main (int argc, char **argv, char **env)
{
NSAutoreleasePool *pool;
NSUserDefaults *ud;
SOGoSockD *sockd;
int rc;

rc = 0;

pool = [NSAutoreleasePool new];

ud = [NSUserDefaults standardUserDefaults];
[ud addSuiteNamed: @"sogod"];
[SOGoSystemDefaults sharedSystemDefaults];

sockd = [SOGoSockD new];
if ([sockd run])
Expand Down

0 comments on commit 4952ff7

Please sign in to comment.