From 2dfd548d26e179dfb12d836b57a88c215d76a926 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 8 Apr 2013 19:20:23 +0200 Subject: Bug #271262 - Allow Send/Receive of local stores in offline --- libemail-engine/e-mail-session-utils.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libemail-engine/e-mail-session-utils.c') diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c index ce400c4d10..da54b7640d 100644 --- a/libemail-engine/e-mail-session-utils.c +++ b/libemail-engine/e-mail-session-utils.c @@ -552,6 +552,14 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple, return; } + provider = camel_service_get_provider (service); + if ((provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0 && + !camel_session_get_online (CAMEL_SESSION (session))) { + /* silently ignore */ + g_object_unref (service); + return; + } + status = camel_service_get_connection_status (service); if (status != CAMEL_SERVICE_CONNECTED) { did_connect = TRUE; @@ -566,8 +574,6 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple, } } - provider = camel_service_get_provider (service); - if (provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER) copy_to_sent = FALSE; -- cgit v1.2.3