[evolution-data-server] 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] Bug 736011 - [CalDAV] Receive two events adds only the first
- Date: Wed, 12 Nov 2014 16:57:25 +0000 (UTC)
commit 90d43847c4766e09cd341f2145db5e6403fff4a3
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 f94a5a9..3add622 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -4311,6 +4311,7 @@ extract_objects (icalcomponent *icomp,
{
icalcomponent *scomp;
icalcomponent_kind kind;
+ GSList *link;
kind = icalcomponent_isa (icomp);
@@ -4328,12 +4329,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
@@ -4543,7 +4547,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]