From c3d4250b6fe3f1f26f759621fa74bc0d9e520b7d Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 18 Jan 2011 03:07:38 +0000 Subject: [PATCH] See Changelog. Monotone-Parent: f638868d7db65b1617476f06e76394a24bca8310 Monotone-Revision: c2f49ba857d8dcdda22d3395cb073bf99a040d49 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-01-18T03:07:38 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Appointments/SOGoEMailAlarmsManager.m | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2bccbdf35..0041f4b31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-01-17 Francis Lachapelle + + * SoObjects/Appointments/SOGoEMailAlarmsManager.m + (-_lookupEntityMatchingRecord:inCalendar:): We check if + recurrenceId is nil prior calling -timeIntervalSince1970. + 2011-01-14 Francis Lachapelle * SoObjects/Appointments/iCalRepeatableEntityObject+SOGo.m diff --git a/SoObjects/Appointments/SOGoEMailAlarmsManager.m b/SoObjects/Appointments/SOGoEMailAlarmsManager.m index 33d6eb6d5..e410d23ac 100644 --- a/SoObjects/Appointments/SOGoEMailAlarmsManager.m +++ b/SoObjects/Appointments/SOGoEMailAlarmsManager.m @@ -207,8 +207,9 @@ inCalendar: (iCalCalendar *) calendar { NSArray *entities; + NSCalendarDate *testRecId; iCalEntityObject *entity, *testEntity; - int count, max, testRecId; + int count, max, testRecIdSecs; entities = [calendar events]; max = [entities count]; @@ -224,8 +225,9 @@ for (count = 0; !entity && count < max; count++) { testEntity = [entities objectAtIndex: count]; - testRecId = (int) [[testEntity recurrenceId] timeIntervalSince1970]; - if ([[record objectForKey: @"c_recurrence_id"] intValue] == testRecId) + testRecId = [testEntity recurrenceId]; + testRecIdSecs = testRecId? [[testEntity recurrenceId] timeIntervalSince1970] : 0; + if ([[record objectForKey: @"c_recurrence_id"] intValue] == testRecIdSecs) entity = testEntity; } }