From 27d987fa5092d12c6d5da6376eb81b907c28d4e5 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 24 Feb 2011 20:18:21 +0000 Subject: [PATCH] Monotone-Parent: e14d9f62a6ec2d7e8788ee6cf73d4a47312b8531 Monotone-Revision: de4f10a9425b25e3d10193bba4c7dc640e4d4ba2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-24T20:18:21 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 11 +++++++++++ SoObjects/Appointments/SOGoAppointmentObject.m | 7 +++++++ SoObjects/Appointments/SOGoTaskObject.m | 18 ++++++++++++++++++ SoObjects/Contacts/SOGoContactGCSEntry.m | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/ChangeLog b/ChangeLog index f50277721..acf8c0103 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2011-02-24 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactGCSEntry.m + (-saveContentString:baseVersion:): release the "card" ivar to + avoid caching issues. + + * SoObjects/Appointments/SOGoTaskObject.m + (-saveContentString:baseVersion:): same as below. + + * SoObjects/Appointments/SOGoAppointmentObject.m + (-saveComponent:): release fullCalendar, safeCalendar and + originalCalendar after modification to avoid caching issues. + * SoObjects/SOGo/SOGoContentObject.m (-davContentLength): return 0 when "content" is nil to avoid a value of "(nil)". (-setMAPIContent:, -MAPIContent): removed obsolete methods (fixed diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 3583d0fd7..c255dc3ef 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -594,6 +594,13 @@ [super saveComponent: newEvent]; } } + + [fullCalendar release]; + fullCalendar = nil; + [safeCalendar release]; + safeCalendar = nil; + [originalCalendar release]; + originalCalendar = nil; } // diff --git a/SoObjects/Appointments/SOGoTaskObject.m b/SoObjects/Appointments/SOGoTaskObject.m index 529ddcb9f..3749e17e1 100644 --- a/SoObjects/Appointments/SOGoTaskObject.m +++ b/SoObjects/Appointments/SOGoTaskObject.m @@ -56,4 +56,22 @@ inContainer: self]; } +#warning this code should be put in SOGoCalendarComponent once the UID hack\ + in SOGoAppointmentObject is resolved +- (NSException *) saveContentString: (NSString *) newContent + baseVersion: (unsigned int) newVersion +{ + NSException *ex; + + ex = [super saveContentString: newContent baseVersion: newVersion]; + [fullCalendar release]; + fullCalendar = nil; + [safeCalendar release]; + safeCalendar = nil; + [originalCalendar release]; + originalCalendar = nil; + + return ex; +} + @end /* SOGoTaskObject */ diff --git a/SoObjects/Contacts/SOGoContactGCSEntry.m b/SoObjects/Contacts/SOGoContactGCSEntry.m index a93285e20..2553b4346 100644 --- a/SoObjects/Contacts/SOGoContactGCSEntry.m +++ b/SoObjects/Contacts/SOGoContactGCSEntry.m @@ -136,4 +136,16 @@ [self saveContentString: [vcard versitString]]; } +- (NSException *) saveContentString: (NSString *) newContent + baseVersion: (unsigned int) newVersion +{ + NSException *ex; + + ex = [super saveContentString: newContent baseVersion: newVersion]; + [card release]; + card = nil; + + return ex; +} + @end /* SOGoContactGCSEntry */