aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine/e-mail-session-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libemail-engine/e-mail-session-utils.c')
-rw-r--r--libemail-engine/e-mail-session-utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c
index 979d15388e..6aa090e0e4 100644
--- a/libemail-engine/e-mail-session-utils.c
+++ b/libemail-engine/e-mail-session-utils.c
@@ -392,6 +392,7 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
{
AsyncContext *context;
CamelFolder *local_sent_folder;
+ CamelServiceConnectionStatus status;
GString *error_messages;
gboolean copy_to_sent = TRUE;
guint ii;
@@ -417,11 +418,15 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
return;
}
- if (camel_service_get_connection_status (service) != CAMEL_SERVICE_CONNECTED) {
+ status = camel_service_get_connection_status (service);
+ if (status != CAMEL_SERVICE_CONNECTED) {
did_connect = TRUE;
/* XXX This API does not allow for cancellation. */
- if (!em_utils_connect_service_sync (service, cancellable, &error)) {
+ em_utils_connect_service_sync (
+ service, cancellable, &error);
+
+ if (error != NULL) {
g_simple_async_result_take_error (simple, error);
return;
}