[evolution-data-server] camel_folder_refresh_info_sync: Connect the CamelService first.



commit 198bc91bd6ee9810f21962b616f2af8326423bf2
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Jul 11 21:27:28 2013 -0400

    camel_folder_refresh_info_sync: Connect the CamelService first.

 camel/camel-folder.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index ad40108..3e017fb 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -4101,6 +4101,7 @@ camel_folder_refresh_info_sync (CamelFolder *folder,
                                 GError **error)
 {
        CamelFolderClass *class;
+       CamelStore *parent_store;
        const gchar *display_name;
        const gchar *message;
        gboolean success;
@@ -4110,6 +4111,13 @@ camel_folder_refresh_info_sync (CamelFolder *folder,
        class = CAMEL_FOLDER_GET_CLASS (folder);
        g_return_val_if_fail (class->refresh_info_sync != NULL, FALSE);
 
+       /* Need to connect the service before we can refresh. */
+       parent_store = camel_folder_get_parent_store (folder);
+       success = camel_service_connect_sync (
+               CAMEL_SERVICE (parent_store), cancellable, error);
+       if (!success)
+               return FALSE;
+
        camel_folder_lock (folder, CAMEL_FOLDER_REC_LOCK);
 
        /* Check for cancellation after locking. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]