[evolution] Bug #722041 - NNTP Messages are silently dropped from Outbox
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #722041 - NNTP Messages are silently dropped from Outbox
- Date: Mon, 10 Feb 2014 16:57:24 +0000 (UTC)
commit 3d4f6335e7178db18a254578922a7d16a53954e1
Author: Milan Crha <mcrha redhat com>
Date: Mon Feb 10 17:57:28 2014 +0100
Bug #722041 - NNTP Messages are silently dropped from Outbox
libemail-engine/mail-ops.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c
index e912871..81ed9a3 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]