aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-01-25 12:09:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-01-25 12:09:00 +0800
commitc3a621bbed7c89882358616c69cdf72a1811780a (patch)
tree25cd4d8e128dff9ea8d6a15e7f9fc95509566e43
parentb17d51a4544badf95edf7cf1d0def2f6ed6a45e9 (diff)
downloadgsoc2013-evolution-c3a621bbed7c89882358616c69cdf72a1811780a.tar.gz
gsoc2013-evolution-c3a621bbed7c89882358616c69cdf72a1811780a.tar.zst
gsoc2013-evolution-c3a621bbed7c89882358616c69cdf72a1811780a.zip
Bug 668480 - Going to online from offline connects disabled accounts
-rw-r--r--mail/e-mail-backend.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 646b203aa1..597a770222 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -190,12 +190,20 @@ mail_backend_prepare_for_online_cb (EShell *shell,
for (link = list; link != NULL; link = g_list_next (link)) {
CamelService *service;
+ EAccount *account;
+ const gchar *uid;
service = CAMEL_SERVICE (link->data);
if (!CAMEL_IS_STORE (service))
continue;
+ uid = camel_service_get_uid (service);
+ account = e_get_account_by_uid (uid);
+
+ if (account != NULL && !account->enabled)
+ continue;
+
/* FIXME Not passing a GCancellable. */
e_mail_store_go_online (
CAMEL_STORE (service), G_PRIORITY_DEFAULT,