Comment 17 for bug 115913

Revision history for this message
Peter Newcomb (peter-petesbox) wrote :

The following patch seems to be working for me, YMMV:

diff -ru evolution-exchange-2.28.1/calendar/e-cal-backend-exchange-calendar.c evolution-exchange-2.28.1-bug115913/calendar/e-cal-backend-exchange-calendar.c
--- evolution-exchange-2.28.1/calendar/e-cal-backend-exchange-calendar.c 2009-10-17 17:46:28.000000000 -0600
+++ evolution-exchange-2.28.1-bug115913/calendar/e-cal-backend-exchange-calendar.c 2009-11-09 10:01:09.000000000 -0700
@@ -836,6 +836,22 @@
  cbdata->vcal_comp = e_cal_util_new_top_level ();
  cbdata->cal = cal;

+ /* Though OWA produces "CLASS:" (which we map to
+ * "CLASS:PUBLIC" above), it will accept "CLASS:PUBLIC".
+ * However, some other exchange clients, notably Windows
+ * Mobile Outlook, don't work unless we map "CLASS:PUBLIC"
+ * back to "CLASS:". For details, see
+ * https://bugs.launchpad.net/ubuntu/+source/evolution-exchange/+bug/115913
+ */
+ icalprop = icalcomponent_get_first_property (icalcomp, ICAL_CLASS_PROPERTY);
+ if (icalprop && !g_ascii_strcasecmp (icalproperty_get_value_as_string (icalprop), icalproperty_enum_to_string (ICAL_CLASS_PUBLIC)))
+ {
+ icalcomponent_remove_property (icalcomp, icalprop);
+ icalproperty_free (icalprop);
+ icalprop = icalproperty_new_class (ICAL_CLASS_NONE);
+ icalcomponent_add_property (icalcomp, icalprop);
+ }
+
  /* Remove X parameters from properties */
  /* This is specifically for X-EVOLUTION-END-DATE,
     but removing anything else is probably ok too */

I'm using Ubuntu 9.10 (Karmic), grabbed the evolution-exchange source package, made the change above, build the .deb and installed it. I have not tested it except that I've been able to create and accept public appointments and meeting invitations in Evolution _and_ have them show up properly on my WM6 phone.

I believe but am not entirely sure that the patch is correct from an evolution-exchange or libical developer's standpoint, as I had never looked at either codebase until this morning. If you try this, it may eat all your email, crash your hard drive, and generally make you have a bad day.

-peter