aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-02-11 00:57:28 +0800
committerMilan Crha <mcrha@redhat.com>2014-02-11 00:57:28 +0800
commit3d4f6335e7178db18a254578922a7d16a53954e1 (patch)
tree7d52f19aa1c1dbf0cae0fb80c2569f218fa97b45
parent614d1618054eb76fafe266009a0258472525f474 (diff)
downloadgsoc2013-evolution-3d4f6335e7178db18a254578922a7d16a53954e1.tar
gsoc2013-evolution-3d4f6335e7178db18a254578922a7d16a53954e1.tar.gz
gsoc2013-evolution-3d4f6335e7178db18a254578922a7d16a53954e1.tar.bz2
gsoc2013-evolution-3d4f6335e7178db18a254578922a7d16a53954e1.tar.lz
gsoc2013-evolution-3d4f6335e7178db18a254578922a7d16a53954e1.tar.xz
gsoc2013-evolution-3d4f6335e7178db18a254578922a7d16a53954e1.tar.zst
gsoc2013-evolution-3d4f6335e7178db18a254578922a7d16a53954e1.zip
Bug #722041 - NNTP Messages are silently dropped from Outbox
-rw-r--r--libemail-engine/mail-ops.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c
index e91287129c..81ed9a32e6 100644
--- a/libemail-engine/mail-ops.c
+++ b/libemail-engine/mail-ops.c
@@ -663,22 +663,18 @@ mail_send_message (struct _send_queue_msg *m,
info = camel_message_info_new (NULL);
camel_message_info_set_flags (info, CAMEL_MESSAGE_SEEN, ~0);
- for (header = xev; header; header = header->next) {
+ for (header = xev; header && !local_error; header = header->next) {
gchar *uri;
if (strcmp (header->name, "X-Evolution-PostTo") != 0)
continue;
- /* TODO: don't lose errors */
-
uri = g_strstrip (g_strdup (header->value));
- /* FIXME Not passing a GCancellable or GError here. */
folder = e_mail_session_uri_to_folder_sync (
- m->session, uri, 0, NULL, NULL);
+ m->session, uri, 0, cancellable, &local_error);
if (folder != NULL) {
- /* FIXME Not passing a GCancellable or GError here. */
camel_folder_append_message_sync (
- folder, message, info, NULL, NULL, NULL);
+ folder, message, info, NULL, cancellable, &local_error);
g_object_unref (folder);
folder = NULL;
}
@@ -688,7 +684,7 @@ mail_send_message (struct _send_queue_msg *m,
/* post process */
mail_tool_restore_xevolution_headers (message, xev);
- if (driver) {
+ if (local_error == NULL && driver) {
camel_filter_driver_filter_message (
driver, message, info, NULL, NULL,
NULL, "", cancellable, &local_error);
@@ -716,10 +712,9 @@ mail_send_message (struct _send_queue_msg *m,
}
}
- if (provider == NULL
- || !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) {
+ if (local_error == NULL && (provider == NULL
+ || !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER))) {
CamelFolder *local_sent_folder;
- GError *local_error = NULL;
local_sent_folder = e_mail_session_get_local_folder (
m->session, E_MAIL_LOCAL_FOLDER_SENT);
@@ -779,6 +774,7 @@ mail_send_message (struct _send_queue_msg *m,
_("Failed to append to "
"local 'Sent' folder: %s"),
local_error->message);
+ g_clear_error (&local_error);
}
}
}
@@ -817,7 +813,7 @@ mail_send_message (struct _send_queue_msg *m,
camel_folder_synchronize_sync (queue, FALSE, NULL, NULL);
}
- if (err->len > 0) {
+ if (local_error == NULL && err->len > 0) {
/* set the culmulative exception report */
g_set_error (
&local_error, CAMEL_ERROR,