aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/conduits
diff options
context:
space:
mode:
authorVeerapuram Varadhan <vvaradan@src.gnome.org>2005-10-01 01:13:04 +0800
committerVeerapuram Varadhan <vvaradan@src.gnome.org>2005-10-01 01:13:04 +0800
commit7c0907172f5dfef27b188a745f0525a76f1fa5b8 (patch)
tree2d8e5f17755327a9dfd9c938c198ef6ada42a66e /calendar/conduits
parenta61075336b590e86aede3936ae0e19577b60f439 (diff)
downloadgsoc2013-evolution-7c0907172f5dfef27b188a745f0525a76f1fa5b8.tar
gsoc2013-evolution-7c0907172f5dfef27b188a745f0525a76f1fa5b8.tar.gz
gsoc2013-evolution-7c0907172f5dfef27b188a745f0525a76f1fa5b8.tar.bz2
gsoc2013-evolution-7c0907172f5dfef27b188a745f0525a76f1fa5b8.tar.lz
gsoc2013-evolution-7c0907172f5dfef27b188a745f0525a76f1fa5b8.tar.xz
gsoc2013-evolution-7c0907172f5dfef27b188a745f0525a76f1fa5b8.tar.zst
gsoc2013-evolution-7c0907172f5dfef27b188a745f0525a76f1fa5b8.zip
Fixes #303702 Call e_cal_component_commit_sequence() after modifying the
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> svn path=/trunk/; revision=30453
Diffstat (limited to 'calendar/conduits')
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c16
1 files changed, 14 insertions, 2 deletions
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;