[evolution-patches] patch for crash in alarm notify
- From: Rodrigo Moya <rodrigo novell com>
- To: Evolution Patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] patch for crash in alarm notify
- Date: Mon, 28 Feb 2005 13:16:27 +0100
This removes use of g_assert and does a better management of the
midnight_refresh
--
Rodrigo Moya <rodrigo novell com>
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2675
diff -u -p -r1.2675 ChangeLog
--- ChangeLog 25 Feb 2005 17:08:07 -0000 1.2675
+++ ChangeLog 28 Feb 2005 12:18:16 -0000
@@ -1,3 +1,18 @@
+2005-02-28 Rodrigo Moya <rodrigo novell com>
+
+ * gui/alarm-notify/alarm-queue.c (alarm_queue_done): don't g_assert, just
+ check for midnight_refresh pointer, and clear it up if not NULL.
+ (queue_midnight_refresh): ditto.
+
+2005-02-28 Rodrigo Moya <rodrigo novell com>
+
+ Fixes #72928
+
+ * gui/alarm-notify/notify-main.c (main): don't call alarm_queue_done...
+
+ * gui/alarm-notify/alarm-notify.c (alarm_notify_finalize): ...do it at
+ the same level than alarm_queue_init.
+
2005-02-25 Sivaiah Nallagatla <snallagatla novell com>
* gui/calendar-component.c (ensure_sources) :
Index: gui/alarm-notify/alarm-queue.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-queue.c,v
retrieving revision 1.79
diff -u -p -r1.79 alarm-queue.c
--- gui/alarm-notify/alarm-queue.c 22 Dec 2004 07:37:25 -0000 1.79
+++ gui/alarm-notify/alarm-queue.c 28 Feb 2005 12:18:16 -0000
@@ -147,7 +147,10 @@ queue_midnight_refresh (void)
time_t midnight;
icaltimezone *zone;
- g_assert (midnight_refresh_id == NULL);
+ if (midnight_refresh_id != NULL) {
+ alarm_remove (midnight_refresh_id);
+ midnight_refresh_id = NULL;
+ }
zone = config_data_get_timezone ();
@@ -180,7 +183,11 @@ midnight_refresh_cb (gpointer alarm_id,
/* Re-schedule the midnight update */
- midnight_refresh_id = NULL;
+ if (midnight_refresh_id != NULL) {
+ alarm_remove (midnight_refresh_id);
+ midnight_refresh_id = NULL;
+ }
+
queue_midnight_refresh ();
}
@@ -1257,9 +1264,10 @@ alarm_queue_done (void)
g_hash_table_destroy (client_alarms_hash);
client_alarms_hash = NULL;
- g_assert (midnight_refresh_id != NULL);
- alarm_remove (midnight_refresh_id);
- midnight_refresh_id = NULL;
+ if (midnight_refresh_id != NULL) {
+ alarm_remove (midnight_refresh_id);
+ midnight_refresh_id = NULL;
+ }
alarm_queue_inited = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]