don't update the cache when we get an error from the server.
authorRodrigo Moya <rodrigo@ximian.com>
Thu, 18 Mar 2004 18:53:57 +0000 (18:53 +0000)
committerRodrigo Moya <rodrigo@src.gnome.org>
Thu, 18 Mar 2004 18:53:57 +0000 (18:53 +0000)
2004-03-18  Rodrigo Moya <rodrigo@ximian.com>

* backends/groupwise/e-cal-backend-groupwise.c
(e_cal_backend_groupwise_create_object,
e_cal_backend_groupwise_modify_object): don't update the cache when we
get an error from the server.

calendar/ChangeLog
calendar/backends/groupwise/e-cal-backend-groupwise.c

index 0558e94..0764356 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-18  Rodrigo Moya <rodrigo@ximian.com>
+
+       * backends/groupwise/e-cal-backend-groupwise.c
+       (e_cal_backend_groupwise_create_object,
+       e_cal_backend_groupwise_modify_object): don't update the cache when we
+       get an error from the server.
+
 2004-03-17  Rodrigo Moya <rodrigo@ximian.com>
 
        Fixes #55719
index 3abccba..a79d3e9 100644 (file)
@@ -895,8 +895,10 @@ e_cal_backend_groupwise_create_object (ECalBackendSync *backend, EDataCal *cal,
        case CAL_MODE_REMOTE :
                /* when online, send the item to the server */
                status = e_gw_connection_send_appointment (priv->cnc, priv->container_id, comp);
-               if (status != E_GW_CONNECTION_STATUS_OK)
-                       break;
+               if (status != E_GW_CONNECTION_STATUS_OK) {
+                       g_object_unref (comp);
+                       return GNOME_Evolution_Calendar_OtherError;
+               }
                /* if successful, update the cache */
        case CAL_MODE_LOCAL :
                /* in offline mode, we just update the cache */
@@ -941,8 +943,10 @@ e_cal_backend_groupwise_modify_object (ECalBackendSync *backend, EDataCal *cal,
        case CAL_MODE_REMOTE :
                /* when online, send the item to the server */
                status = e_gw_connection_send_appointment (priv->cnc, priv->container_id, comp);
-               if (status != E_GW_CONNECTION_STATUS_OK)
-                       break;
+               if (status != E_GW_CONNECTION_STATUS_OK) {
+                       g_object_unref (comp);
+                       return GNOME_Evolution_Calendar_OtherError;
+               }
                /* if successful, update the cache */
        case CAL_MODE_LOCAL :
                /* in offline mode, we just update the cache */