[evolution-data-server] camel_folder_expunge_sync: Connect the CamelService first.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] camel_folder_expunge_sync: Connect the CamelService first.
- Date: Fri, 12 Jul 2013 23:32:15 +0000 (UTC)
commit b5e5414b0f302d93ea1a2f9d4522fa665bcfe105
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jul 12 19:17:54 2013 -0400
camel_folder_expunge_sync: Connect the CamelService first.
camel/camel-folder.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 900bf0f..df75e59 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -3531,15 +3531,23 @@ camel_folder_expunge_sync (CamelFolder *folder,
GError **error)
{
CamelFolderClass *class;
+ CamelStore *parent_store;
const gchar *display_name;
const gchar *message;
- gboolean success = TRUE;
+ gboolean success;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
class = CAMEL_FOLDER_GET_CLASS (folder);
g_return_val_if_fail (class->expunge_sync != NULL, FALSE);
+ /* Need to connect the service before we can expunge. */
+ 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]