diff options
author | Milan Crha <mcrha@redhat.com> | 2011-05-12 14:26:58 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-05-12 14:26:58 +0800 |
commit | b6324935dbfe1e26ae883955f0939ce734a4d0ae (patch) | |
tree | c22fa0286bf618d9ffe9aad89d624c03b398595c /mail/e-mail-session-utils.c | |
parent | 20ba4ae4bbd244b90e2c1af7df4db7f9be14fadd (diff) | |
download | gsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.tar gsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.tar.gz gsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.tar.bz2 gsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.tar.lz gsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.tar.xz gsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.tar.zst gsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.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)) { |