aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog10
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c16
2 files changed, 24 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c8072916f7..ef0c1b91f0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,13 @@
+2005-09-30 Veerapuram Varadhan <vvaradhan@novell.com>
+
+ Fixes #303702
+ * calendar/conduits/calendar/calendar-conduit.c:
+ (process_multi_day): Call e_cal_component_commit_sequence() after
+ modifying the properties of an ECalComponent and before fetching
+ its icalcomponent.
+
+ Reworked the patch from Dave Malcolm <dmalcolm@redhat.com>
+
2005-09-30 Viren.L <lviren@novell.com>
Fixes #258786
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index d84fb72e83..f58d56c13d 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -616,9 +616,10 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
old_end_value = dt_end.value;
while (!last) {
ECalComponent *clone = e_cal_component_clone (ccc->comp);
+ icalcomponent *ical_comp = NULL;
char *new_uid = e_cal_component_gen_uid ();
struct icaltimetype start_value, end_value;
- ECalChange *c = g_new0 (ECalChange, 1);
+ ECalChange *c = NULL;
if (day_end >= event_end) {
day_end = event_end;
@@ -635,9 +636,20 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
dt_end.value = &end_value;
e_cal_component_set_dtend (clone, &dt_end);
+ e_cal_component_commit_sequence (clone);
+
/* FIXME Error handling */
- e_cal_create_object (ctxt->client, e_cal_component_get_icalcomponent (clone), NULL, NULL);
+ ical_comp = e_cal_component_get_icalcomponent (clone);
+ if (!ical_comp) {
+ ret = FALSE;
+ g_free (new_uid);
+ g_object_unref (clone);
+ goto cleanup;
+ }
+
+ e_cal_create_object (ctxt->client, ical_comp, NULL, NULL);
+ c = g_new0 (ECalChange, 1);
c->comp = clone;
c->type = E_CAL_CHANGE_ADDED;