diff --git a/NEWS b/NEWS index 0782818e9..1d70e29bc 100644 --- a/NEWS +++ b/NEWS @@ -45,6 +45,7 @@ Bug fixes - fixed handling of ACLs on shared calendars with multiple groups (#1854) - fixed HTML formatting of appointment notifications for Outlook (#2233) - replace slashes by dashes in filenames of attachments to avoid a 404 return code (#2537) + - avoid over-using LDAP connections when decomposing groups 2.1.1b (2013-12-04) ------------------- diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 428301564..d595bdba0 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -1,10 +1,6 @@ /* SOGoCalendarComponent.m - this file is part of SOGo * - * Copyright (C) 2006-2012 Inverse inc. - * - * Author: Wolfgang Sourdeau - * Francis Lachapelle - * Ludovic Marcotte + * Copyright (C) 2006-2014 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +18,7 @@ * Boston, MA 02111-1307, USA. */ +#import #import #import #import @@ -492,18 +489,31 @@ NSMutableArray *allAttendees; iCalPerson *currentAttendee; NSEnumerator *enumerator; + NSAutoreleasePool *pool; SOGoGroup *group; BOOL eventWasModified; - unsigned int i; + unsigned int i, j; + domain = [[context activeUser] domain]; organizerEmail = [[theEvent organizer] rfc822Email]; eventWasModified = NO; allAttendees = [NSMutableArray arrayWithArray: [theEvent attendees]]; enumerator = [[theEvent attendees] objectEnumerator]; + + j = 0; + + pool = [[NSAutoreleasePool alloc] init]; + while ((currentAttendee = [enumerator nextObject])) { + if (j%5 == 0) + { + RELEASE(pool); + pool = [[NSAutoreleasePool alloc] init]; + } + group = [SOGoGroup groupWithEmail: [currentAttendee rfc822Email] inDomain: domain]; if (group) @@ -547,11 +557,15 @@ eventWasModified = YES; } } + + j++; } // while (currentAttendee ... if (eventWasModified) [theEvent setAttendees: allAttendees]; + RELEASE(pool); + return eventWasModified; } diff --git a/SoObjects/SOGo/SOGoGroup.m b/SoObjects/SOGo/SOGoGroup.m index 4a170be9b..648b97ae4 100644 --- a/SoObjects/SOGo/SOGoGroup.m +++ b/SoObjects/SOGo/SOGoGroup.m @@ -1,8 +1,6 @@ /* SOGoGroup.m - this file is part of SOGo * - * Copyright (C) 2009-2012 Inverse inc. - * - * Author: Ludovic Marcotte + * Copyright (C) 2009-2014 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by