diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-07-12 04:57:38 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-07-12 05:17:59 +0800 |
commit | 27e9b17c38848a418730413fdeb27527e64c86eb (patch) | |
tree | 99a48a15affb4ab66814c04dbfda9c9cf7c3365b /mail | |
parent | 245486307d8ce23496455bd80bc247e29c5cd667 (diff) | |
download | gsoc2013-evolution-27e9b17c38848a418730413fdeb27527e64c86eb.tar.gz gsoc2013-evolution-27e9b17c38848a418730413fdeb27527e64c86eb.tar.zst gsoc2013-evolution-27e9b17c38848a418730413fdeb27527e64c86eb.zip |
refresh_folders_exec: Make sure the service is connected.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mail-send-recv.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index c9334bdf59..6de97a26b9 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -1028,6 +1028,7 @@ refresh_folders_exec (struct _refresh_folders_msg *m, { CamelFolder *folder; gint i; + gboolean success; GError *local_error = NULL; gulong handler_id = 0; @@ -1036,6 +1037,11 @@ refresh_folders_exec (struct _refresh_folders_msg *m, m->info->cancellable, "cancelled", G_CALLBACK (main_op_cancelled_cb), cancellable); + success = camel_service_connect_sync ( + CAMEL_SERVICE (m->store), cancellable, error); + if (!success) + goto exit; + get_folders (m->store, m->folders, m->finfo); camel_operation_push_message (m->info->cancellable, _("Updating...")); @@ -1084,7 +1090,8 @@ refresh_folders_exec (struct _refresh_folders_msg *m, camel_operation_pop_message (m->info->cancellable); - if (cancellable) +exit: + if (handler_id > 0) g_signal_handler_disconnect (m->info->cancellable, handler_id); } |