[evolution-ews] When we get EWS_CONNECTION_ERROR_ITEMNOTFOUND during delete items we probably not in sync. we have t
- From: Pavel Ocheretny <pocheretny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] When we get EWS_CONNECTION_ERROR_ITEMNOTFOUND during delete items we probably not in sync. we have t
- Date: Thu, 2 Jun 2011 13:08:40 +0000 (UTC)
commit a2d7a8fe9531971b989b7aaddf2c49120e43ec7d
Author: Pavel Ocheretny <pocheretny src gnome org>
Date: Thu Jun 2 16:03:04 2011 +0300
When we get EWS_CONNECTION_ERROR_ITEMNOTFOUND during delete items we probably not in sync.
we have to clear the error and preform sync
src/calendar/e-cal-backend-ews.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index f683aed..6fcf6d2 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -837,15 +837,19 @@ ews_cal_remove_object_cb (GObject *object, GAsyncResult *res, gpointer user_data
simple = G_SIMPLE_ASYNC_RESULT (res);
- if (!g_simple_async_result_propagate_error(simple, &error)) {
+ if (!g_simple_async_result_propagate_error (simple, &error)) {
/* FIXME: This is horrid. Will bite us when we start to delete
more than one item at a time... */
if (remove_data->comp)
ews_cal_delete_comp (remove_data->cbews, remove_data->comp, remove_data->item_id.id);
} else {
- /* The calendar UI doesn't *display* errors unless they have
- the OtherError code */
- error->code = OtherError;
+ /*In case where item already removed, we do not want to fail*/
+ if (error->code == EWS_CONNECTION_ERROR_ITEMNOTFOUND) {
+ g_clear_error (&error);
+ /*probably we are not in sync, let's sync with server*/
+ ews_start_sync (remove_data->cbews);
+ } else
+ error->code = OtherError;
}
if (remove_data->context)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]