See ChangeLog

Monotone-Parent: 83c63e63da91d2b44db08849dc570ff2029ed74a
Monotone-Revision: 5cd36f9e514c2019e708362661b3ede2e8598fb8

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2010-03-24T15:22:59
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Ludovic Marcotte 2010-03-24 15:22:59 +00:00
parent c9c3226988
commit 8dfaa80f36
6 changed files with 27 additions and 25 deletions

View File

@ -1,3 +1,14 @@
2010-03-24 Ludovic Marcotte <lmarcotte@inverse.ca>
* Added a patch from Christophe Palanche and
Guillaume Schreiner which makes the SOGo
cache code usable with repcached
(http://repcached.lab.klab.org/)
* SOPE/NGCards/versitCardsSaxDriver/VSSaxDriver.m
(- _parseLine:) fixed incorrrect handling
of QP-encoded attributes.
2010-03-22 Ludovic Marcotte <lmarcotte@inverse.ca> 2010-03-22 Ludovic Marcotte <lmarcotte@inverse.ca>
* SoObjects/Mailer/SOGoDraftObject.m - we strip * SoObjects/Mailer/SOGoDraftObject.m - we strip

View File

@ -861,7 +861,7 @@ static NSCharacterSet *whitespaceCharSet = nil;
// TODO: make the encoding check more generic // TODO: make the encoding check more generic
if ([tagAttributes containsObject: @"ENCODING=QUOTED-PRINTABLE"]) if ([tagAttributes containsObject: @"ENCODING=QUOTED-PRINTABLE"])
{ {
NSString *charset; NSString *charset, *v;
NSData *d; NSData *d;
int i; int i;
@ -873,10 +873,13 @@ static NSCharacterSet *whitespaceCharSet = nil;
for (i = 0; i < [tagAttributes count]; i++) for (i = 0; i < [tagAttributes count]; i++)
{ {
charset = [[tagAttributes objectAtIndex: i] lowercaseString]; v = [[tagAttributes objectAtIndex: i] lowercaseString];
if ([charset hasPrefix: @"charset"]) if ([v hasPrefix: @"charset"])
charset = [charset substringFromIndex: 8]; {
charset = [v substringFromIndex: 8];
break;
}
} }
tagValue = [NSString stringWithData: d usingEncodingNamed: charset]; tagValue = [NSString stringWithData: d usingEncodingNamed: charset];

View File

@ -1,6 +1,6 @@
/* SOGoCache.h - this file is part of SOGo /* SOGoCache.h - this file is part of SOGo
* *
* Copyright (C) 2008-2009 Inverse inc. * Copyright (C) 2008-2010 Inverse inc.
* *
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca> * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Ludovic Marcotte <lmarcotte@inverse.ca> * Ludovic Marcotte <lmarcotte@inverse.ca>
@ -42,11 +42,7 @@
NSMutableDictionary *cache; NSMutableDictionary *cache;
NSMutableDictionary *users; NSMutableDictionary *users;
float cleanupInterval; float cleanupInterval;
int memcachedServerPort;
NSString *memcachedServerName; NSString *memcachedServerName;
// @private
// memcached_server_st *servers;
// memcached_st *handle;
} }
+ (SOGoCache *) sharedCache; + (SOGoCache *) sharedCache;

View File

@ -106,23 +106,21 @@ static memcached_st *handle = NULL;
if (handle) if (handle)
{ {
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 '%@':%i as server", [self logWithFormat: @"Using host(s) '%@' as server(s)",
memcachedServerName, memcachedServerPort]; memcachedServerName];
if (!servers) if (!servers)
servers servers
= memcached_server_list_append(NULL, = memcached_servers_parse([memcachedServerName UTF8String]);
[memcachedServerName UTF8String],
memcachedServerPort, &error);
error = memcached_server_push(handle, servers); error = memcached_server_push(handle, servers);
} }
} }

View File

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

View File

@ -1,6 +1,6 @@
/* SOGoSystemDefaults.m - this file is part of SOGo /* SOGoSystemDefaults.m - this file is part of SOGo
* *
* Copyright (C) 2009 Inverse inc. * Copyright (C) 2009-2010 Inverse inc.
* *
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca> * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* *
@ -261,11 +261,6 @@ 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"];