merge of '776dc75fed5683da1627715f48714600978e0286'

and 'a9979a68cce7a82e5b6ee0e52a65df546ab56c59'

Monotone-Parent: 776dc75fed5683da1627715f48714600978e0286
Monotone-Parent: a9979a68cce7a82e5b6ee0e52a65df546ab56c59
Monotone-Revision: bc53d4486da9eb6b195273cef7d073fdcf53aa5c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-02-24T21:39:01
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2010-02-24 21:39:01 +00:00
commit 92e5b30310
8 changed files with 23 additions and 7 deletions

View file

@ -1,3 +1,12 @@
2010-02-23 Ludovic Marcotte <lmarcotte@inverse.ca>
* Added a patch from Adam Yearout <ayearout@royal.wednet.edu>
to fix OpenSUSE compilation issues.
* Added a patch from dev@ib.pl to make the memcached port
being used by SOGo configurable using the SOGoMemcachedPort
default option.
2010-02-19 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2010-02-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalListingActions.m * UI/Scheduler/UIxCalListingActions.m

View file

@ -12,6 +12,7 @@ ADDITIONAL_CPPFLAGS += \
SOGo_LIBRARIES_DEPEND_UPON += \ SOGo_LIBRARIES_DEPEND_UPON += \
-L../../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ \ -L../../OGoContentStore/$(GNUSTEP_OBJ_DIR)/ \
-L../../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ \ -L../../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ \
-lmemcached \
-lOGoContentStore \ -lOGoContentStore \
-lGDLAccess \ -lGDLAccess \
-lNGObjWeb \ -lNGObjWeb \

View file

@ -42,6 +42,7 @@
NSMutableDictionary *cache; NSMutableDictionary *cache;
NSMutableDictionary *users; NSMutableDictionary *users;
float cleanupInterval; float cleanupInterval;
int memcachedServerPort;
NSString *memcachedServerName; NSString *memcachedServerName;
// @private // @private
// memcached_server_st *servers; // memcached_server_st *servers;

View file

@ -105,26 +105,24 @@ static memcached_st *handle = NULL;
handle = memcached_create(NULL); handle = memcached_create(NULL);
if (handle) if (handle)
{ {
#warning We could also make the port number configurable and even make use \
of NGNetUtilities for that.
sd = [SOGoSystemDefaults sharedSystemDefaults]; sd = [SOGoSystemDefaults sharedSystemDefaults];
// We define the default value for cleaning up cached users' // We define the default value for cleaning up cached users'
// preferences. This value should be relatively high to avoid // preferences. This value should be relatively high to avoid
// useless database calls. // useless database calls.
cleanupInterval = [sd cacheCleanupInterval]; cleanupInterval = [sd cacheCleanupInterval];
memcachedServerPort = [sd memcachedPort];
ASSIGN (memcachedServerName, [sd memcachedHost]); ASSIGN (memcachedServerName, [sd memcachedHost]);
[self logWithFormat: @"Cache cleanup interval set every %f seconds", [self logWithFormat: @"Cache cleanup interval set every %f seconds",
cleanupInterval]; cleanupInterval];
[self logWithFormat: @"Using host '%@' as server", [self logWithFormat: @"Using host '%@':%i as server",
memcachedServerName]; memcachedServerName, memcachedServerPort];
if (!servers) if (!servers)
servers servers
= memcached_server_list_append(NULL, = memcached_server_list_append(NULL,
[memcachedServerName UTF8String], [memcachedServerName UTF8String],
11211, &error); memcachedServerPort, &error);
error = memcached_server_push(handle, servers); error = memcached_server_push(handle, servers);
} }
} }

View file

@ -13,6 +13,7 @@
SOGoCacheCleanupInterval = 300.0; SOGoCacheCleanupInterval = 300.0;
SOGoMemcachedHost = "localhost"; SOGoMemcachedHost = "localhost";
SOGoMemcachedPort = 11211;
SOGoUIxDebugEnabled = NO; SOGoUIxDebugEnabled = NO;

View file

@ -51,6 +51,7 @@
- (NSTimeInterval) cacheCleanupInterval; - (NSTimeInterval) cacheCleanupInterval;
- (NSString *) memcachedHost; - (NSString *) memcachedHost;
- (int) memcachedPort;
- (BOOL) userCanChangePassword; - (BOOL) userCanChangePassword;
- (BOOL) uixAdditionalPreferences; - (BOOL) uixAdditionalPreferences;

View file

@ -260,6 +260,11 @@ BootstrapNSUserDefaults ()
return [self stringForKey: @"SOGoMemcachedHost"]; return [self stringForKey: @"SOGoMemcachedHost"];
} }
- (int) memcachedPort
{
return [self integerForKey: @"SOGoMemcachedPort"];
}
- (BOOL) uixDebugEnabled - (BOOL) uixDebugEnabled
{ {
return [self boolForKey: @"SOGoUIxDebugEnabled"]; return [self boolForKey: @"SOGoUIxDebugEnabled"];

View file

@ -317,7 +317,7 @@ static NSArray *tasksFields = nil;
SOGoAppointmentFolders *clientObject; SOGoAppointmentFolders *clientObject;
SOGoUser *ownerUser; SOGoUser *ownerUser;
NSString *owner, *role; NSString *owner, *role;
BOOL isErasable, *folderIsRemote; BOOL isErasable, folderIsRemote;
infos = [NSMutableArray array]; infos = [NSMutableArray array];
marker = [NSNull null]; marker = [NSNull null];