[evolution-patches] please review the patch of #51187 (calendar)
- From: jack jia <jack jia sun com>
- To: evolution-patches <evolution-patches ximian com>
- Subject: [evolution-patches] please review the patch of #51187 (calendar)
- Date: Thu, 20 Nov 2003 14:31:22 +0800
Hi Rodrigo and JP:
Could you review the patch for bug #51187?
http://bugzilla.ximian.com/show_bug.cgi?id=51187
Please notice my comments in src code.
in the gui/alarm-notify/alarm-queue.c (obj_updated_cb).
obj_updated_cb (..)
{
.....
cqa = lookup_comp_queued_alarms (ca, uid);
if (!cqa)
add_component_alarms (ca, alarms);
else {
GSList *l;
/* if already in the list, just update it */
remove_alarms (cqa, FALSE);
cqa->alarms = alarms;
cqa->queued_alarms = NULL;
....
cqa->queued_alarms = g_slist_prepend
(cqa->queued_alarms, qa);
// it want to reuse the cqa, but it will cause the
// cqa->queued_alarms NULL. and it will lead to
evolution-alarm-notify's crash.
// so i suggest not to reuse the cqa and remove it
// from ca, and then new a cqa and add it to ca.
}
--
jack jia <jack jia sun com>
SUN China Engineering Research Institute
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1802.2.39
diff -u -r1.1802.2.39 ChangeLog
--- ChangeLog 19 Nov 2003 05:53:26 -0000 1.1802.2.39
+++ ChangeLog 20 Nov 2003 06:07:50 -0000
@@ -1,3 +1,10 @@
+2003-11-20 Jack Jia <jack jia sun com>
+
+ Fix for #51187.
+
+ * gui/alarm-notify/alarm-queue.c (obj_updated_cb): Do not reuse
+ cqa (ComQueuedAlarms).
+
2003-11-19 Jack Jia <jack jia sun com>
Fix for #51052.
Index: gui/alarm-notify/alarm-queue.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-queue.c,v
retrieving revision 1.40
diff -u -r1.40 alarm-queue.c
--- gui/alarm-notify/alarm-queue.c 13 May 2003 22:59:06 -0000 1.40
+++ gui/alarm-notify/alarm-queue.c 20 Nov 2003 06:07:50 -0000
@@ -519,41 +519,8 @@
if (!cqa)
add_component_alarms (ca, alarms);
else {
- GSList *l;
-
- /* if already in the list, just update it */
- remove_alarms (cqa, FALSE);
- cqa->alarms = alarms;
- cqa->queued_alarms = NULL;
-
- /* add the new alarms */
- for (l = cqa->alarms->alarms; l; l = l->next) {
- CalAlarmInstance *instance;
- gpointer alarm_id;
- QueuedAlarm *qa;
-
- instance = l->data;
-
- alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, NULL);
- if (!alarm_id) {
- g_message ("obj_updated_cb(): Could not schedule a trigger for "
- "%ld, discarding...", (long) instance->trigger);
- continue;
- }
-
- qa = g_new (QueuedAlarm, 1);
- qa->alarm_id = alarm_id;
- qa->instance = instance;
- qa->snooze = FALSE;
-
- cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
- }
-
- if (cqa->queued_alarms == NULL) {
- if (!cqa->expecting_update)
- remove_comp (ca, uid);
- } else
- cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
+ remove_comp (ca, uid);
+ add_component_alarms (ca, alarms);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]