[evolution] Always notify about finished updated_folders() call
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Always notify about finished updated_folders() call
- Date: Tue, 10 Jul 2012 08:56:41 +0000 (UTC)
commit 82e980001bdbc20996985f1ec33b968cd133d677
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 10 10:55:16 2012 +0200
Always notify about finished updated_folders() call
libemail-engine/mail-folder-cache.c | 13 +++++--------
mail/mail-send-recv.c | 13 +++++++------
2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index 2c832f5..71dd237 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -830,6 +830,7 @@ update_folders (CamelStore *store,
CamelFolderInfo *fi;
StoreInfo *si;
GError *error = NULL;
+ gboolean free_fi = TRUE;
fi = camel_store_get_folder_info_finish (store, result, &error);
@@ -857,14 +858,10 @@ update_folders (CamelStore *store,
si->first_update = FALSE;
}
- if (fi != NULL) {
- gboolean free_fi = TRUE;
-
- if (ud->done != NULL)
- free_fi = ud->done (ud->cache, store, fi, ud->data);
- if (free_fi)
- camel_store_free_folder_info (store, fi);
- }
+ if (ud->done != NULL)
+ free_fi = ud->done (ud->cache, store, fi, ud->data);
+ if (fi && free_fi)
+ camel_store_free_folder_info (store, fi);
if (ud->cancellable != NULL)
g_object_unref (ud->cancellable);
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 1670cf0..3657cfd 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -1008,17 +1008,18 @@ refresh_folders_exec (struct _refresh_folders_msg *m,
m->folders->pdata[i], 0,
cancellable, &local_error);
if (folder) {
- /* FIXME Not passing a GError here. */
- camel_folder_synchronize_sync (
- folder, FALSE, cancellable, NULL);
- camel_folder_refresh_info_sync (folder, cancellable, NULL);
+ if (camel_folder_synchronize_sync (folder, FALSE, cancellable, &local_error))
+ camel_folder_refresh_info_sync (folder, cancellable, &local_error);
g_object_unref (folder);
- } else if (local_error != NULL) {
+ }
+
+ if (local_error != NULL) {
g_warning ("Failed to refresh folders: %s", local_error->message);
g_clear_error (&local_error);
}
- if (g_cancellable_is_cancelled (m->info->cancellable))
+ if (g_cancellable_is_cancelled (m->info->cancellable) ||
+ g_cancellable_is_cancelled (cancellable))
break;
if (m->info->state != SEND_CANCELLED)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]