Bug 634663 - e-calendar-factory crashes while retracting a meeting.
authorPunit Jain <jpunit@novell.com>
Mon, 21 Mar 2011 03:44:16 +0000 (09:14 +0530)
committerBharath Acharya <abharath@novell.com>
Mon, 21 Mar 2011 03:44:16 +0000 (09:14 +0530)
We were sending wrong users list. The patch resolves the issue.

calendar/backends/groupwise/e-cal-backend-groupwise.c

index 60fce4a..11d717c 100644 (file)
@@ -2730,10 +2730,15 @@ e_cal_backend_groupwise_send_objects (ECalBackendSync *backend, EDataCal *cal, c
                        e_cal_component_get_attendee_list (comp, &attendee_list);
                        /* convert this into GList */
                        for (tmp = attendee_list; tmp; tmp = g_slist_next (tmp)) {
-                               const gchar *attendee = tmp->data;
-
-                               if (attendee)
-                                       *users = g_list_append (*users, g_strdup (attendee));
+                               ECalComponentAttendee *attendee = NULL;
+                               const gchar *email_id = NULL;
+                               attendee = (ECalComponentAttendee *) (tmp->data);
+                               if (attendee) {
+                                       email_id = attendee->value;
+                                       if (!g_ascii_strncasecmp (email_id, "mailto:", 7))
+                                               email_id += 7;
+                                       *users = g_list_append (*users, g_strdup (email_id));
+                               }
                        }
 
                        g_object_unref (comp);