[evolution-patches] fix for the bug #314925 [calendar]



Hi,
   Have attached the fix for the bug. Please see the ChangeLog for more
information.

thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.514
diff -u -p -r1.514 ChangeLog
--- ChangeLog	27 Sep 2005 09:39:14 -0000	1.514
+++ ChangeLog	28 Sep 2005 10:22:42 -0000
@@ -1,3 +1,10 @@
+2005-09-28  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #314925
+	* libecal/e-cal-component.c: 
+	(set_attendee_list): Free the old attendee list after
+	adding the new attendees.
+
 2005-09-26  Wang Xin  <jedy wang sun com>
 
 	Fixes #317226
Index: libecal/e-cal-component.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-component.c,v
retrieving revision 1.18
diff -u -p -r1.18 e-cal-component.c
--- libecal/e-cal-component.c	31 Aug 2005 04:21:54 -0000	1.18
+++ libecal/e-cal-component.c	28 Sep 2005 10:22:45 -0000
@@ -4439,26 +4439,9 @@ set_attendee_list (icalcomponent *icalco
 		   GSList **attendee_list,
 		   GSList *al)
 {
-	GSList *l;
-
-	/* Remove old attendees */
-
-	for (l = *attendee_list; l; l = l->next) {
-		struct attendee *attendee;
-
-		attendee = l->data;
-		g_assert (attendee->prop != NULL);
-
-		icalcomponent_remove_property (icalcomp, attendee->prop);
-		icalproperty_free (attendee->prop);
-		g_free (attendee);
-	}
-
-	g_slist_free (*attendee_list);
-	*attendee_list = NULL;
+	GSList *l, *new_attendees = NULL;
 
 	/* Add in new attendees */
-
 	for (l = al; l; l = l->next) {
 		ECalComponentAttendee *a;
 		struct attendee *attendee;
@@ -4512,9 +4495,24 @@ set_attendee_list (icalcomponent *icalco
 			icalproperty_add_parameter (attendee->prop, attendee->language_param);
 		}
 
-		*attendee_list = g_slist_prepend (*attendee_list, attendee);
+		new_attendees = g_slist_prepend (new_attendees, attendee);
+	}
+
+	/* Remove old attendees */
+	for (l = *attendee_list; l; l = l->next) {
+		struct attendee *attendee;
+
+		attendee = l->data;
+		g_assert (attendee->prop != NULL);
+		
+		icalcomponent_remove_property (icalcomp, attendee->prop);
+		icalproperty_free (attendee->prop);
+		g_free (attendee);
 	}
+	g_slist_free (*attendee_list);
 
+	/* Assign the new attendees */
+	*attendee_list = new_attendees;
 	*attendee_list = g_slist_reverse (*attendee_list);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]