[evolution-patches] [evolution-data-server] fix for 335225, Move appointment to contact folder causes Evolution to hang, evolution-data-server to creash



hi, 

This patch is for fixing 335225, Move appointment to contact folder
causes Evolution to hang, evolution-data-server to creash.

Please review 

Thanks

--Irene
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.568
diff -u -r1.568 ChangeLog
--- calendar/ChangeLog	4 Mar 2006 10:29:06 -0000	1.568
+++ calendar/ChangeLog	20 Mar 2006 13:49:22 -0000
@@ -1,3 +1,11 @@
+2006-03-20  Irene Huang <Irene Huang sun com>
+
+	Fixes bug 335225
+
+	* libedata-cal/e-cal-backend-sync.c:
+	(e_cal_backend_sync_create_object): check whether the current
+	calendar is read_only or not, if read only, do not create object.
+
 2006-03-04  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #330974
Index: calendar/libedata-cal/e-cal-backend-sync.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sync.c,v
retrieving revision 1.19
diff -u -r1.19 e-cal-backend-sync.c
--- calendar/libedata-cal/e-cal-backend-sync.c	4 Mar 2006 09:57:00 -0000	1.19
+++ calendar/libedata-cal/e-cal-backend-sync.c	20 Mar 2006 13:49:22 -0000
@@ -224,8 +224,12 @@
 e_cal_backend_sync_create_object (ECalBackendSync *backend, EDataCal *cal, char **calobj, char **uid)
 {
  	ECalBackendSyncStatus status;
+	gboolean read_only = FALSE;
  
   	g_return_val_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), GNOME_Evolution_Calendar_OtherError);
+	E_CAL_BACKEND_SYNC_GET_CLASS (backend)->is_read_only_sync (backend, cal, &read_only);
+	if (read_only)
+		return GNOME_Evolution_Calendar_UnsupportedMethod;
   	g_return_val_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->create_object_sync != NULL,
   			      GNOME_Evolution_Calendar_UnsupportedMethod);
   


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