diff options
author | Milan Crha <mcrha@redhat.com> | 2011-05-12 14:26:58 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:12 +0800 |
commit | 6215f7990598eed1a7212ae6d08c61442c622fb8 (patch) | |
tree | 1b0bd28c62aa993bfa10586a2d7e1e25f8314375 /mail/e-mail-session-utils.c | |
parent | 045bbf1c62ceffcc1a77090d7a94972bb31b58e8 (diff) | |
download | gsoc2013-evolution-6215f7990598eed1a7212ae6d08c61442c622fb8.tar gsoc2013-evolution-6215f7990598eed1a7212ae6d08c61442c622fb8.tar.gz gsoc2013-evolution-6215f7990598eed1a7212ae6d08c61442c622fb8.tar.bz2 gsoc2013-evolution-6215f7990598eed1a7212ae6d08c61442c622fb8.tar.lz gsoc2013-evolution-6215f7990598eed1a7212ae6d08c61442c622fb8.tar.xz gsoc2013-evolution-6215f7990598eed1a7212ae6d08c61442c622fb8.tar.zst gsoc2013-evolution-6215f7990598eed1a7212ae6d08c61442c622fb8.zip |
Cannot send message with just enabled account
Everything in UI seemed as working fine, but the message is just lost,
even there was printed a runtime warning on the console.
This is fixing couple things along this issue:
- differentiate between NULL and invalid pointers/objects
in new e_mail_folder_uri_...() functions
- report error to UI if mail_session_send_to_thread() fails to find
corresponding transport service
- call e_mail_store_add_by_account() in mail_store_load_accounts()
(a side-effect of this change is no code duplication and unified
processing of the same action)
Diffstat (limited to 'mail/e-mail-session-utils.c')
-rw-r--r-- | mail/e-mail-session-utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mail/e-mail-session-utils.c b/mail/e-mail-session-utils.c index b307fdc15c..ae9bd96a39 100644 --- a/mail/e-mail-session-utils.c +++ b/mail/e-mail-session-utils.c @@ -406,7 +406,12 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple, service = camel_session_get_service ( CAMEL_SESSION (session), context->transport_uid); - g_return_if_fail (CAMEL_IS_TRANSPORT (service)); + if (!CAMEL_IS_TRANSPORT (service)) { + g_simple_async_result_set_error (simple, + CAMEL_SERVICE_ERROR, CAMEL_SERVICE_ERROR_URL_INVALID, + _("Cannot get transport service for account '%s'"), context->transport_uid); + return; + } /* XXX This API does not allow for cancellation. */ if (!camel_service_connect_sync (service, &error)) { |