[evolution-patches] [calendar-alarms]fix for a crash



hi
 
     there is a crash in alarm-notifier when the option
     to quit alarms is chosen. This is due to 
     attempts in removal of hash table items with
    wrong keys and asserting if hash table is empty 
    later. Changelog explains it further.

  regards

P. S. Chakravarthi
Software Engineer
pchakravarthi novell com
Phone: 25731856 Extn: 3198

Novell Inc.
Software for the Open Enterprise  

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2871
diff -u -p -r1.2871 ChangeLog
--- ChangeLog	15 Dec 2005 08:20:56 -0000	1.2871
+++ ChangeLog	15 Dec 2005 08:30:39 -0000
@@ -1,3 +1,11 @@
+2005-12-15 P S Chakravarthi <pchakravarthi novell com>
+
+	Fixes a crash in alarm-daemon on selecting "Quit" in panel options
+	* gui/alarm-notify/alarm-queue.c (add_id_cb) (remove_client_alarms):
+	 Removed the code that duplicates ids (ECalComponentId) to make 
+	a list of ids for removal. Having the code as it is causes a crash 
+	as we fail in deleting items from hash table.
+
 2005-12-15  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #321739
Index: gui/alarm-notify/alarm-queue.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-queue.c,v
retrieving revision 1.91
diff -u -p -r1.91 alarm-queue.c
--- gui/alarm-notify/alarm-queue.c	24 Nov 2005 15:28:11 -0000	1.91
+++ gui/alarm-notify/alarm-queue.c	15 Dec 2005 08:30:42 -0000
@@ -1805,13 +1805,7 @@ static void
 add_id_cb (gpointer key, gpointer value, gpointer data)
 {
 	GSList **ids = (GSList **) data;
-	ECalComponentId *id = g_new0 (ECalComponentId, 1);
-	ECalComponentId *temp = (ECalComponentId *)key;
-
-	id->uid = g_strdup (temp->uid);
-	id->rid = g_strdup (temp->rid);
-
-	*ids = g_slist_prepend (*ids, (ECalComponentId *) id);
+	*ids = g_slist_prepend (*ids, (ECalComponentId *) key);
 }
 
 /* Removes all the alarms queued for a particular calendar client */
@@ -1832,8 +1826,6 @@ remove_client_alarms (ClientAlarms *ca)
 
 		remove_comp (ca, id);
 	}
-
-	g_slist_free (ids);
 
 	/* The hash table should be empty now */
 


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