[evolution] I#164 - Mute "Failed to handle source headers" runtime warning
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#164 - Mute "Failed to handle source headers" runtime warning
- Date: Wed, 10 Oct 2018 19:45:36 +0000 (UTC)
commit 9750eb54707115b4af35ba7b7d10dd1e0529c380
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 10 21:45:57 2018 +0200
I#164 - Mute "Failed to handle source headers" runtime warning
Closes https://gitlab.gnome.org/GNOME/evolution/issues/164
src/libemail-engine/e-mail-session-utils.c | 10 +++++++---
src/libemail-engine/mail-ops.c | 6 ++++--
2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/libemail-engine/e-mail-session-utils.c b/src/libemail-engine/e-mail-session-utils.c
index c86909d743..3aaf924e0b 100644
--- a/src/libemail-engine/e-mail-session-utils.c
+++ b/src/libemail-engine/e-mail-session-utils.c
@@ -757,10 +757,14 @@ cleanup:
* or replied to. */
e_mail_session_handle_source_headers_sync (
session, context->message, cancellable, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_clear_error (&error);
+ if (error &&
+ !g_error_matches (error, CAMEL_FOLDER_ERROR, CAMEL_FOLDER_ERROR_INVALID_UID) &&
+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_warning (
+ "%s: Failed to handle source headers: %s",
+ G_STRFUNC, error->message);
}
+ g_clear_error (&error);
exit:
diff --git a/src/libemail-engine/mail-ops.c b/src/libemail-engine/mail-ops.c
index 28101e5e85..028272ed01 100644
--- a/src/libemail-engine/mail-ops.c
+++ b/src/libemail-engine/mail-ops.c
@@ -845,12 +845,14 @@ mail_send_message (struct _send_queue_msg *m,
* or replied to. */
e_mail_session_handle_source_headers_sync (
m->session, message, cancellable, &local_error);
- if (local_error != NULL) {
+ if (local_error &&
+ !g_error_matches (local_error, CAMEL_FOLDER_ERROR, CAMEL_FOLDER_ERROR_INVALID_UID) &&
+ !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
g_warning (
"%s: Failed to handle source headers: %s",
G_STRFUNC, local_error->message);
- g_clear_error (&local_error);
}
+ g_clear_error (&local_error);
}
if (local_error == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]