diff -Nru evolution-ews-3.18.5/debian/changelog evolution-ews-3.18.5/debian/changelog --- evolution-ews-3.18.5/debian/changelog 2016-02-23 11:08:08.000000000 +0000 +++ evolution-ews-3.18.5/debian/changelog 2017-02-02 16:25:57.000000000 +0000 @@ -1,3 +1,9 @@ +evolution-ews (3.18.5-1ubuntu1) xenial-proposed; urgency=medium + + * Fix recurring events not displayed with Exchange 2016 (LP: #1540461) + + -- Bryan Quigley Thu, 02 Feb 2017 11:25:57 -0500 + evolution-ews (3.18.5-1) unstable; urgency=medium * New upstream release 3.18.5 diff -Nru evolution-ews-3.18.5/debian/control evolution-ews-3.18.5/debian/control --- evolution-ews-3.18.5/debian/control 2016-02-23 11:06:45.000000000 +0000 +++ evolution-ews-3.18.5/debian/control 2017-02-02 16:25:57.000000000 +0000 @@ -1,7 +1,8 @@ Source: evolution-ews Section: gnome Priority: optional -Maintainer: Debian Evolution Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Evolution Maintainers Uploaders: Heikki Henriksen , Lawrence Walton , Loic Minier , diff -Nru evolution-ews-3.18.5/debian/patches/series evolution-ews-3.18.5/debian/patches/series --- evolution-ews-3.18.5/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ evolution-ews-3.18.5/debian/patches/series 2017-02-02 16:25:57.000000000 +0000 @@ -0,0 +1 @@ +workaround-evolution-2016-broken-mime-type.patch diff -Nru evolution-ews-3.18.5/debian/patches/workaround-evolution-2016-broken-mime-type.patch evolution-ews-3.18.5/debian/patches/workaround-evolution-2016-broken-mime-type.patch --- evolution-ews-3.18.5/debian/patches/workaround-evolution-2016-broken-mime-type.patch 1970-01-01 00:00:00.000000000 +0000 +++ evolution-ews-3.18.5/debian/patches/workaround-evolution-2016-broken-mime-type.patch 2017-02-02 16:25:57.000000000 +0000 @@ -0,0 +1,56 @@ +Description: Workaround evolution 2016 broken mime type + Workaround Exchange 2016 error, which returns invalid iCalendar object (without 'END:VCALENDAR'), + when the event has at least one detached instance. + . + evolution-ews (3.18.5-1ubuntu1) xenial-proposed; urgency=medium + . + * Fix recurring events not displayed (LP: #1540461) + +--- + +Origin: upstream, https://git.gnome.org/browse/evolution-ews/commit/?id=4940e4c +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=771370 +Bug-Ubuntu: https://launchpad.net/bugs/1540461 +Last-Update: 2017-02-02 + +--- evolution-ews-3.18.5.orig/src/calendar/e-cal-backend-ews.c ++++ evolution-ews-3.18.5/src/calendar/e-cal-backend-ews.c +@@ -3134,6 +3134,38 @@ add_item_to_cache (ECalBackendEws *cbews + mime_content = e_ews_item_get_mime_content (item); + vcomp = icalparser_parse_string (mime_content); + ++ if (!vcomp && mime_content) { ++ const gchar *begin_vcalendar, *end_vcalendar; ++ ++ /* Workaround Exchange 2016 error, which returns invalid iCalendar object (without 'END:VCALENDAR'), ++ when the event has at least one detached instance. */ ++ begin_vcalendar = camel_strstrcase (mime_content, "BEGIN:VCALENDAR"); ++ end_vcalendar = camel_strstrcase (mime_content, "END:VCALENDAR"); ++ ++ /* If it exists, then it should be alone on a separate line */ ++ if (!(begin_vcalendar && (begin_vcalendar == mime_content || begin_vcalendar[-1] == '\n') && ++ (begin_vcalendar[15 /* strlen ("BEGIN:VCALENDAR") */] == '\r' || begin_vcalendar[15] == '\n'))) ++ begin_vcalendar = NULL; ++ ++ /* If it exists, then it should be alone on a separate line and not at the very beginning of the mime_content */ ++ if (!(end_vcalendar && end_vcalendar > mime_content && end_vcalendar[-1] == '\n' && ++ (end_vcalendar[13 /* strlen ("END:VCALENDAR") */] == '\r' || end_vcalendar[13] == '\n' || end_vcalendar[13] == '\0'))) ++ end_vcalendar = NULL; ++ ++ if (begin_vcalendar && !end_vcalendar) { ++ gchar *str; ++ ++ str = g_strconcat (mime_content, "\r\n", "END:VCALENDAR", "\r\n", NULL); ++ vcomp = icalparser_parse_string (str); ++ g_free (str); ++ } ++ } ++ ++ if (!vcomp) { ++ g_warn_if_reached (); ++ return; ++ } ++ + tzid = e_ews_item_get_tzid (item); + if (tzid == NULL) { + /*