[evolution-ews] Handle modified occurrences correctly when deleting them
- From: Or Goshen <ogosh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Handle modified occurrences correctly when deleting them
- Date: Wed, 31 Aug 2011 07:13:54 +0000 (UTC)
commit 58ebdedd2188dd5f29f92031a606bf52d20d167d
Author: Or Goshen <orx goshen intel com>
Date: Wed Aug 31 10:11:39 2011 +0300
Handle modified occurrences correctly when deleting them
src/calendar/e-cal-backend-ews.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index f5febc9..7e1919f 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -917,7 +917,7 @@ ews_cal_remove_object_cb (GObject *object, GAsyncResult *res, gpointer user_data
more than one item at a time... */
if (remove_data->comp) {
if (remove_data->rid && !remove_data->modified) ews_cal_append_exdate (remove_data->cbews, remove_data->comp, remove_data->rid);
- else ews_cal_delete_comp (remove_data->cbews, remove_data->comp, remove_data->item_id.id, remove_data->modified);
+ if (!remove_data->rid || remove_data->modified) ews_cal_delete_comp (remove_data->cbews, remove_data->comp, remove_data->item_id.id, remove_data->modified);
}
} else {
/*In case where item already removed, we do not want to fail*/
@@ -925,7 +925,7 @@ ews_cal_remove_object_cb (GObject *object, GAsyncResult *res, gpointer user_data
g_clear_error (&error);
if (remove_data->comp) {
if (remove_data->rid && !remove_data->modified) ews_cal_append_exdate (remove_data->cbews, remove_data->comp, remove_data->rid);
- else ews_cal_delete_comp (remove_data->cbews, remove_data->comp, remove_data->item_id.id, remove_data->modified);
+ if (!remove_data->rid || remove_data->modified) ews_cal_delete_comp (remove_data->cbews, remove_data->comp, remove_data->item_id.id, remove_data->modified);
}
} else
error->code = OtherError;
@@ -1013,7 +1013,11 @@ e_cal_backend_ews_remove_object (ECalBackend *backend, EDataCal *cal, EServerMet
ews_cal_component_get_item_id (comp, &item_id.id, &item_id.change_key);
} else {
- if (rid) modified = TRUE;
+ if (rid) {
+ modified = TRUE;
+ index = e_cal_rid_to_index (rid, e_cal_component_get_icalcomponent (comp), &error);
+ if (error) goto exit;
+ }
ews_cal_component_get_item_id (comp, &item_id.id, &item_id.change_key);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]