[evolution-patches] fix for the bug #311831 [calendar]
- From: chen <pchenthill novell com>
- To: patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] fix for the bug #311831 [calendar]
- Date: Wed, 10 Aug 2005 03:45:25 +0530
Hi,
Sorry, pressed send by mistake while writing the previous mail. Have
attached the patch. We should propably, creating a new enum
structure to identify the e_cal call made as below
typedef enum {
E_CAL_GET_NONE,
E_CAL_GET_READ_ONLY,
E_CAL_GET_CAL_ADDRESS,
E_CAL_GET_ALARM_ADDRESS,
... (for all the calls)
} call_type;
and add this to the CalendarOp structure, so that we dont emit cond
signals for some other call by checking the call_type, when a
notification is received from the backend.
Not sure if this would break the ABI. If this does not break the ABI,
will modify the patch. If it breaks, we could use the current patch for
now.
thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.491
diff -u -p -r1.491 ChangeLog
--- ChangeLog 9 Aug 2005 10:44:03 -0000 1.491
+++ ChangeLog 9 Aug 2005 21:42:48 -0000
@@ -1,3 +1,12 @@
+2005-08-10 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #311831
+ * libecal/e-cal.c (cal_read_only_cb): Check if
+ the op->bool is TRUE before emiting the cond
+ signal.
+ (get_read_only): set the op->bool to true while
+ making the request.
+
2005-08-09 Sankar P <psankar novell com>
* backends/groupwise/e-cal-backend-groupwise.c:
Index: libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.109
diff -u -p -r1.109 e-cal.c
--- libecal/e-cal.c 25 Jul 2005 14:12:58 -0000 1.109
+++ libecal/e-cal.c 9 Aug 2005 21:43:07 -0000
@@ -410,7 +410,7 @@ cal_read_only_cb (ECalListener *listener
op = e_calendar_get_op (ecal);
- if (op == NULL) {
+ if (op == NULL || !op->bool) {
ecal->priv->read_only = read_only;
return;
}
@@ -2130,6 +2130,10 @@ get_read_only (ECal *ecal, gboolean *rea
g_mutex_lock (our_op->mutex);
+ /* set it to true so that op does not emit cond signals for all notifications
+ from the backend */
+ op->bool = TRUE;
+
g_mutex_unlock (ecal->priv->mutex);
@@ -2155,7 +2159,10 @@ get_read_only (ECal *ecal, gboolean *rea
g_cond_wait (our_op->cond, our_op->mutex);
status = our_op->status;
- *read_only = our_op->bool;
+
+ if (status == E_CALENDAR_STATUS_OK)
+ *read_only = our_op->bool;
+
e_calendar_remove_op (ecal, our_op);
g_mutex_unlock (our_op->mutex);
e_calendar_free_op (our_op);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]