From d629811e4ec149f9895930f6a553f97607bd8db2 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 27 Jan 2012 13:31:37 +0000 Subject: [PATCH 1/5] Fixed strings file Monotone-Parent: 6bee8aebb26a5d4337cc6ae5400d1573f789be82 Monotone-Revision: 3e4e00b49a457f4533668ca39d8371e85202e49c Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-01-27T13:31:37 --- UI/PreferencesUI/English.lproj/Localizable.strings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings index 836df58d4..001a10858 100644 --- a/UI/PreferencesUI/English.lproj/Localizable.strings +++ b/UI/PreferencesUI/English.lproj/Localizable.strings @@ -30,7 +30,7 @@ "Disable auto reply on" = "Disable auto reply on"; "Please specify your message and your email addresses for which you want to enable auto reply." = "Please specify your message and your email addresses for which you want to enable auto reply."; -""Your vacation message must not end with a single dot on a line." +"Your vacation message must not end with a single dot on a line." = "Your vacation message must not end with a single dot on a line."; "End date of your auto reply must be in the future." = "End date of your auto reply must be in the future."; @@ -296,4 +296,4 @@ "Password change is not supported." = "Password change is not supported."; "Unhandled HTTP error code: %{0}" = "Unhandled HTTP error code: %{0}"; "New password:" = "New password:"; -"Confirmation:" = "Confirmation:"; \ No newline at end of file +"Confirmation:" = "Confirmation:"; From 671feec0b41b063bb07734823d75aade1f8bea2d Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 27 Jan 2012 13:47:45 +0000 Subject: [PATCH 2/5] More fix. Monotone-Parent: 3e4e00b49a457f4533668ca39d8371e85202e49c Monotone-Revision: ee188ecf014aadf3749779aa50df66d72a126c71 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-01-27T13:47:45 --- UI/PreferencesUI/English.lproj/Localizable.strings | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings index 001a10858..a733315f1 100644 --- a/UI/PreferencesUI/English.lproj/Localizable.strings +++ b/UI/PreferencesUI/English.lproj/Localizable.strings @@ -30,8 +30,7 @@ "Disable auto reply on" = "Disable auto reply on"; "Please specify your message and your email addresses for which you want to enable auto reply." = "Please specify your message and your email addresses for which you want to enable auto reply."; -"Your vacation message must not end with a single dot on a line." -= "Your vacation message must not end with a single dot on a line."; +"Your vacation message must not end with a single dot on a line." = "Your vacation message must not end with a single dot on a line."; "End date of your auto reply must be in the future." = "End date of your auto reply must be in the future."; From 87e3db53911d202e2f36ac7402e56c794a092e4d Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 27 Jan 2012 15:21:51 +0000 Subject: [PATCH 3/5] See ChangeLog Monotone-Parent: ee188ecf014aadf3749779aa50df66d72a126c71 Monotone-Revision: 15c306f9d11152fee321b11e184bc75e9e2be6f8 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-01-27T15:21:51 --- ChangeLog | 10 ++++++++++ .../Appointments/SOGoAppointmentFolder.m | 5 +++++ .../SOGoAppointmentFolderObject.m | 19 +++++++++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86d942303..6ff47bf57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-01-27 Ludovic Marcotte + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (bareFetchFields: ...) - we now cache the returned + results - just like for fetchFields:... + + * SoObjects/Appointments/SOGoAppointmentFolderObject.m + (_folderCalenars) - we now ask for the c_content and use + a local autorelease pool to avoid consuming too much memory + 2012-01-26 Ludovic Marcotte * SoObjects/SOGo/LDAPSource.{h,m} - now honor diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index b9a3f8700..882f5cac9 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -558,6 +558,11 @@ static NSNumber *sharedYes = nil; } else records = [NSArray array]; + + if ([self _checkIfWeCanRememberRecords: fields]) + { + [self _rememberRecords: records]; + } return records; } diff --git a/SoObjects/Appointments/SOGoAppointmentFolderObject.m b/SoObjects/Appointments/SOGoAppointmentFolderObject.m index 112c26ea6..8cde6867e 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolderObject.m +++ b/SoObjects/Appointments/SOGoAppointmentFolderObject.m @@ -1,6 +1,6 @@ /* SOGoAppointmentFolderObject.m - this file is part of SOGo * - * Copyright (C) 2010 Inverse inc. + * Copyright (C) 2010-2012 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -21,6 +21,7 @@ */ #import +#import #import #import #import @@ -50,7 +51,7 @@ static NSArray *contentFields = nil; if (!contentFields) contentFields = [[NSArray alloc] initWithObjects: @"c_name", @"c_version", @"c_lastmodified", @"c_creationdate", - @"c_component", nil]; + @"c_component", @"c_content", nil]; } - (id) init @@ -181,6 +182,7 @@ static NSArray *contentFields = nil; NSArray *records; NSMutableArray *calendars; SOGoCalendarComponent *component; + NSAutoreleasePool *pool; int count, max; iCalCalendar *calendar; NSString *name; @@ -188,8 +190,19 @@ static NSArray *contentFields = nil; records = [self _fetchFolderRecords]; max = [records count]; calendars = [NSMutableArray arrayWithCapacity: max]; + pool = nil; + + // This can consume a significant amount of memory so + // we use a local autorelease pool to avoid running + // out of memory. for (count = 0; count < max; count++) { + if (count % 100 == 0) + { + RELEASE(pool); + pool = [[NSAutoreleasePool alloc] init]; + } + name = [[records objectAtIndex: count] objectForKey: @"c_name"]; component = [folder lookupName: name inContext: context @@ -202,6 +215,8 @@ static NSArray *contentFields = nil; @" be listed here", name]; } + RELEASE(pool); + return calendars; } From e6806a7bc96a2b85494788bee6503b20ac708f8e Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 27 Jan 2012 15:24:00 +0000 Subject: [PATCH 4/5] Fixed merge Monotone-Parent: b1c3c4abdd41b8895de8a28a2a5fe6ce0af01caf Monotone-Revision: 8daffcffafece4be7e0553a181f9186e385e2b77 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-01-27T15:24:00 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ea57bdc1..8eca5567f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,3 @@ -<<<<<<< variant A 2012-01-27 Ludovic Marcotte * SoObjects/Appointments/SOGoAppointmentFolder.m @@ -9,7 +8,6 @@ (_folderCalenars) - we now ask for the c_content and use a local autorelease pool to avoid consuming too much memory ->>>>>>> variant B 2012-01-26 Wolfgang Sourdeau * OpenChange/MAPIStoreCommonViewsContext.[hm], @@ -38,8 +36,6 @@ (+listContextsForUser:inMemCtx:): new individual method invoked by the above. Overridden by concrete subclasses. -####### Ancestor -======= end 2012-01-26 Ludovic Marcotte * SoObjects/SOGo/LDAPSource.{h,m} - now honor From 9da91b055fd3232d3a7de995c65ed4a2c3983fce Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 27 Jan 2012 20:37:00 +0000 Subject: [PATCH 5/5] Sanity check to not fetch freebusy info from Exchange if no hostname is defined Monotone-Parent: 15c306f9d11152fee321b11e184bc75e9e2be6f8 Monotone-Revision: 78e0e48d54b37e3da54b0ecca3eb1ed2dd1b41f7 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-01-27T20:37:00 --- SoObjects/Appointments/SOGoFreeBusyObject.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index 87bd989ae..13622ae4f 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -294,7 +294,7 @@ contact = [contacts lastObject]; email = [contact valueForKey: @"c_email"]; source = [contact objectForKey: @"source"]; - if ([email length]) + if ([email length] && [source MSExchangeHostname]) { exchangeFreeBusy = [[MSExchangeFreeBusy alloc] init]; [exchangeFreeBusy autorelease];