aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-folder-utils.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-05-12 14:26:58 +0800
committerMilan Crha <mcrha@redhat.com>2011-05-12 14:26:58 +0800
commitb6324935dbfe1e26ae883955f0939ce734a4d0ae (patch)
treec22fa0286bf618d9ffe9aad89d624c03b398595c /mail/e-mail-folder-utils.c
parent20ba4ae4bbd244b90e2c1af7df4db7f9be14fadd (diff)
downloadgsoc2013-evolution-b6324935dbfe1e26ae883955f0939ce734a4d0ae.tar.gz
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-folder-utils.c')
-rw-r--r--mail/e-mail-folder-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail/e-mail-folder-utils.c b/mail/e-mail-folder-utils.c
index 6f23158ab5..905874e6ac 100644
--- a/mail/e-mail-folder-utils.c
+++ b/mail/e-mail-folder-utils.c
@@ -686,6 +686,7 @@ e_mail_folder_uri_build (CamelStore *store,
gchar *encoded_uid;
gchar *uri;
+ g_return_val_if_fail (store != NULL, NULL);
g_return_val_if_fail (CAMEL_IS_STORE (store), NULL);
g_return_val_if_fail (folder_name != NULL, NULL);
@@ -743,6 +744,7 @@ e_mail_folder_uri_parse (CamelSession *session,
gchar *folder_name = NULL;
gboolean success = FALSE;
+ g_return_val_if_fail (session != NULL, FALSE);
g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE);
g_return_val_if_fail (folder_uri != NULL, FALSE);
@@ -883,6 +885,7 @@ e_mail_folder_uri_equal (CamelSession *session,
gboolean success_b;
gboolean equal = FALSE;
+ g_return_val_if_fail (session != NULL, FALSE);
g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE);
g_return_val_if_fail (folder_uri_a != NULL, FALSE);
g_return_val_if_fail (folder_uri_b != NULL, FALSE);
@@ -934,6 +937,7 @@ e_mail_folder_uri_from_folder (CamelFolder *folder)
CamelStore *store;
const gchar *folder_name;
+ g_return_val_if_fail (folder != NULL, NULL);
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
store = camel_folder_get_parent_store (folder);