[evolution-ews] Fetch fresh folder's change-key, when reading folder permissions
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Fetch fresh folder's change-key, when reading folder permissions
- Date: Mon, 27 May 2013 18:35:03 +0000 (UTC)
commit 23d2f130454fea75919fbc4e24545b8637abd32c
Author: Milan Crha <mcrha redhat com>
Date: Mon May 27 20:34:11 2013 +0200
Fetch fresh folder's change-key, when reading folder permissions
src/configuration/e-ews-edit-folder-permissions.c | 22 +++++++++++++++++++-
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/configuration/e-ews-edit-folder-permissions.c
b/src/configuration/e-ews-edit-folder-permissions.c
index f4a3d12..28b8d7e 100644
--- a/src/configuration/e-ews-edit-folder-permissions.c
+++ b/src/configuration/e-ews-edit-folder-permissions.c
@@ -686,6 +686,7 @@ read_folder_permissions_thread (GObject *dialog,
g_return_if_fail (widgets->registry != NULL);
g_return_if_fail (widgets->source != NULL);
g_return_if_fail (widgets->ews_settings != NULL);
+ g_return_if_fail (widgets->folder_id != NULL);
widgets->conn = e_ews_config_utils_open_connection_for (
widgets->registry,
@@ -700,9 +701,26 @@ read_folder_permissions_thread (GObject *dialog,
if (g_cancellable_is_cancelled (cancellable))
return;
- e_ews_connection_get_folder_permissions_sync (
+ if (e_ews_connection_get_folder_permissions_sync (
widgets->conn,
- G_PRIORITY_DEFAULT, widgets->folder_id, ppermissions, cancellable, perror);
+ G_PRIORITY_DEFAULT, widgets->folder_id, ppermissions, cancellable, perror)) {
+ EEwsFolder *folder = NULL;
+
+ e_ews_connection_get_folder_info_sync (widgets->conn,
+ G_PRIORITY_DEFAULT, NULL, widgets->folder_id,
+ &folder, cancellable, NULL);
+
+ if (folder) {
+ const EwsFolderId *folder_id = e_ews_folder_get_id (folder);
+
+ if (folder_id) {
+ g_free (widgets->folder_id->change_key);
+ widgets->folder_id->change_key = g_strdup (folder_id->change_key);
+ }
+
+ g_object_unref (folder);
+ }
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]