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>
* SoObjects/Mailer/SOGoDraftObject.m - we strip

View File

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

View File

@ -1,6 +1,6 @@
/* 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>
* Ludovic Marcotte <lmarcotte@inverse.ca>
@ -42,11 +42,7 @@
NSMutableDictionary *cache;
NSMutableDictionary *users;
float cleanupInterval;
int memcachedServerPort;
NSString *memcachedServerName;
// @private
// memcached_server_st *servers;
// memcached_st *handle;
}
+ (SOGoCache *) sharedCache;

View File

@ -106,23 +106,21 @@ static memcached_st *handle = NULL;
if (handle)
{
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
// useless database calls.
cleanupInterval = [sd cacheCleanupInterval];
memcachedServerPort = [sd memcachedPort];
ASSIGN (memcachedServerName, [sd memcachedHost]);
ASSIGN(memcachedServerName, [sd memcachedHost]);
[self logWithFormat: @"Cache cleanup interval set every %f seconds",
cleanupInterval];
[self logWithFormat: @"Using host '%@':%i as server",
memcachedServerName, memcachedServerPort];
[self logWithFormat: @"Using host(s) '%@' as server(s)",
memcachedServerName];
if (!servers)
servers
= memcached_server_list_append(NULL,
[memcachedServerName UTF8String],
memcachedServerPort, &error);
= memcached_servers_parse([memcachedServerName UTF8String]);
error = memcached_server_push(handle, servers);
}
}

View File

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

View File

@ -1,6 +1,6 @@
/* 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>
*
@ -261,11 +261,6 @@ BootstrapNSUserDefaults ()
return [self stringForKey: @"SOGoMemcachedHost"];
}
- (int) memcachedPort
{
return [self integerForKey: @"SOGoMemcachedPort"];
}
- (BOOL) uixDebugEnabled
{
return [self boolForKey: @"SOGoUIxDebugEnabled"];