[evolution-patches] Fix for bug #62868 [calendar]



Hi,
   Have attached the fix for the bug 62868 which occurs which accepting
the appointment more than once.

thanks, chenthill.

Index: servers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/ChangeLog,v
retrieving revision 1.67
diff -u -p -r1.67 ChangeLog
--- servers/groupwise/ChangeLog	23 Sep 2004 16:45:29 -0000	1.67
+++ servers/groupwise/ChangeLog	29 Sep 2004 17:19:13 -0000
@@ -1,3 +1,9 @@
+2004-09-29  Chenthill Palanisamy <pchenthill novell com>
+
+	Fixes #62868
+	* e-gw-connection.[ch] (e_gw_connection_parse_response_status):
+	Added the error code and an enum variable for Item already accepted.
+	
 2004-09-23  JP Rosevear  <jpr novell com>
 
 	* Makefile.am: build versioned library and don't hard code pkg
Index: servers/groupwise/e-gw-connection.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.h,v
retrieving revision 1.35
diff -u -p -r1.35 e-gw-connection.h
--- servers/groupwise/e-gw-connection.h	22 Sep 2004 16:41:07 -0000	1.35
+++ servers/groupwise/e-gw-connection.h	29 Sep 2004 17:19:14 -0000
@@ -61,6 +61,7 @@ typedef enum {
 	E_GW_CONNECTION_STATUS_INVALID_RESPONSE,
 	E_GW_CONNECTION_STATUS_OBJECT_NOT_FOUND,
 	E_GW_CONNECTION_STATUS_BAD_PARAMETER,
+	E_GW_CONNECTION_STATUS_ITEM_ALREADY_ACCEPTED,
 	E_GW_CONNECTION_STATUS_OTHER,
 	E_GW_CONNECTION_STATUS_UNKNOWN
 } EGwConnectionStatus;
Index: servers/groupwise/e-gw-connection.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.c,v
retrieving revision 1.81
diff -u -p -r1.81 e-gw-connection.c
--- servers/groupwise/e-gw-connection.c	22 Sep 2004 16:41:07 -0000	1.81
+++ servers/groupwise/e-gw-connection.c	29 Sep 2004 17:19:14 -0000
@@ -64,6 +64,7 @@ e_gw_connection_parse_response_status (S
 	switch (soup_soap_parameter_get_int_value (subparam)) {
 	case 0 : return E_GW_CONNECTION_STATUS_OK;
 	case 59905 : return E_GW_CONNECTION_STATUS_BAD_PARAMETER;
+	case 59914: return E_GW_CONNECTION_STATUS_ITEM_ALREADY_ACCEPTED;
 		/* FIXME: map all error codes */
 	}
 
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.337
diff -u -p -r1.337 ChangeLog
--- calendar/ChangeLog	28 Sep 2004 15:58:37 -0000	1.337
+++ calendar/ChangeLog	29 Sep 2004 17:19:15 -0000
@@ -1,3 +1,14 @@
+2004-09-29  Chenthill Palanisamy <pchenthill novell com>
+
+	Fixes #62868
+	* e-cal-backend-groupwise-utils.c (e_gw_connection_send_appointment):
+	Send the Connection Status as Ok even if we get an error message from
+	the server for accepting the appointment more than once since it does
+	affect the functionality.
+	* e-cal-backend-groupwise.c (receive_objects):
+	Return the status immediately if the Item has not been modified. Now
+	the Permission Denied error message need not be sent.
+
 2004-09-28  Rodrigo Moya <rodrigo novell com>
 
 	Fixes #66230
Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v
retrieving revision 1.35
diff -u -p -r1.35 e-cal-backend-groupwise-utils.c
--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	22 Sep 2004 16:41:07 -0000	1.35
+++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	29 Sep 2004 17:19:15 -0000
@@ -773,6 +773,10 @@ e_gw_connection_send_appointment (ECalBa
 	default:
 		return E_GW_CONNECTION_STATUS_INVALID_OBJECT;
 	}
+	
+	if (status == E_GW_CONNECTION_STATUS_ITEM_ALREADY_ACCEPTED)
+		return E_GW_CONNECTION_STATUS_OK;
+
 	if (!*remove && status == E_GW_CONNECTION_STATUS_OK) {
 		EGwItem *item;
 
Index: calendar/backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.96
diff -u -p -r1.96 e-cal-backend-groupwise.c
--- calendar/backends/groupwise/e-cal-backend-groupwise.c	23 Sep 2004 21:06:46 -0000	1.96
+++ calendar/backends/groupwise/e-cal-backend-groupwise.c	29 Sep 2004 17:19:16 -0000
@@ -1417,7 +1417,7 @@ e_cal_backend_groupwise_remove_object (E
 static ECalBackendSyncStatus
 receive_object (ECalBackendGroupwise *cbgw, EDataCal *cal, icalcomponent *icalcomp)
 {
-	ECalComponent *comp, *modif_comp;
+	ECalComponent *comp, *modif_comp = NULL;
 	ECalBackendGroupwisePrivate *priv;
 	icalproperty_method method;
 	EGwConnectionStatus status;
@@ -1431,6 +1431,9 @@ receive_object (ECalBackendGroupwise *cb
 	
 	status = e_gw_connection_send_appointment (cbgw, priv->container_id, comp, method, &remove, &modif_comp);
 
+	if (status == E_GW_CONNECTION_STATUS_OK && !modif_comp)
+		return GNOME_Evolution_Calendar_Success;
+
 	/* update the cache */
 	if (status == E_GW_CONNECTION_STATUS_OK) {
 		if (remove) {
@@ -1472,11 +1475,6 @@ receive_object (ECalBackendGroupwise *cb
 
 	if (status == E_GW_CONNECTION_STATUS_INVALID_OBJECT)
 		return  GNOME_Evolution_Calendar_InvalidObject;
-	/* We need not do this when evolution starts deleting the calendar items from mail component 
-	   as when they are handled. The BAD_PARAMETER is checked due to the absence of proper error
-	   code from the server */
-	else if (status == E_GW_CONNECTION_STATUS_BAD_PARAMETER)
-		return GNOME_Evolution_Calendar_PermissionDenied;
 	return GNOME_Evolution_Calendar_OtherError;
 }
 


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