From cd920cab1adf6a8c73626fb423b9ede6b92a38db Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 9 Sep 2010 14:07:33 +0200 Subject: Bug #629089 - Accepting a meeting request sends a Tentative reply --- calendar/gui/itip-utils.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 28d95ac767..1c4ced6105 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -1037,6 +1037,36 @@ comp_minimal (ECalComponent *comp, gboolean attendee) return NULL; } +static void +strip_x_microsoft_props (ECalComponent *comp) +{ + GSList *lst = NULL, *l; + icalcomponent *icalcomp; + icalproperty *icalprop; + + g_return_if_fail (comp != NULL); + + icalcomp = e_cal_component_get_icalcomponent (comp); + g_return_if_fail (icalcomp != NULL); + + for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); + icalprop; + icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) { + const gchar *x_name = icalproperty_get_x_name (icalprop); + + if (x_name && g_ascii_strncasecmp (x_name, "X-MICROSOFT-", 12) == 0) + lst = g_slist_prepend (lst, icalprop); + } + + for (l = lst; l != NULL; l = l->next) { + icalprop = l->data; + icalcomponent_remove_property (icalcomp, icalprop); + icalproperty_free (icalprop); + } + + g_slist_free (lst); +} + static ECalComponent * comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *client, icalcomponent *zones, gboolean strip_alarms) { @@ -1121,6 +1151,8 @@ comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *clien cal_obj_uid_list_free (uids); } + strip_x_microsoft_props (clone); + /* Strip X-LIC-ERROR stuff */ e_cal_component_strip_errors (clone); -- cgit v1.2.3