[evolution-data-server/evolution-data-server-3-12] Bug 736011 - [CalDAV] Receive two events adds only the first
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/evolution-data-server-3-12] Bug 736011 - [CalDAV] Receive two events adds only the first
- Date: Wed, 12 Nov 2014 16:58:44 +0000 (UTC)
commit 3764c4154cec4b5b82642099603f3f44aa2314ec
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 12 17:56:11 2014 +0100
Bug 736011 - [CalDAV] Receive two events adds only the first
calendar/backends/caldav/e-cal-backend-caldav.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index 686020e..bae0a48 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -4343,6 +4343,7 @@ extract_objects (icalcomponent *icomp,
{
icalcomponent *scomp;
icalcomponent_kind kind;
+ GSList *link;
kind = icalcomponent_isa (icomp);
@@ -4360,12 +4361,15 @@ extract_objects (icalcomponent *icomp,
scomp = icalcomponent_get_first_component (icomp, ekind);
while (scomp) {
- /* Remove components from toplevel here */
*objects = g_slist_prepend (*objects, scomp);
- icalcomponent_remove_component (icomp, scomp);
scomp = icalcomponent_get_next_component (icomp, ekind);
}
+
+ for (link = *objects; link; link = g_slist_next (link)) {
+ /* Remove components from toplevel here */
+ icalcomponent_remove_component (icomp, link->data);
+ }
}
static gboolean
@@ -4575,7 +4579,10 @@ do_receive_objects (ECalBackendSync *backend,
/* Extract optional timezone compnents */
extract_timezones (cbdav, icomp);
- tmethod = icalcomponent_get_method (icomp);
+ if (icalcomponent_get_first_property (icomp, ICAL_METHOD_PROPERTY))
+ tmethod = icalcomponent_get_method (icomp);
+ else
+ tmethod = ICAL_METHOD_PUBLISH;
for (iter = objects; iter && !err; iter = iter->next) {
icalcomponent *scomp;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]