From 6a791ddb8dd0167cb645776b58ee5636e744c3e0 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 28 Oct 2002 16:33:47 +0000 Subject: instead of bailing with an assertion dump the body. 2002-10-28 Larry Ewing * mail-format.c (handle_multipart_mixed): instead of bailing with an assertion dump the body. svn path=/trunk/; revision=18457 --- mail/ChangeLog | 5 +++++ mail/mail-format.c | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 36bd3749c8..c107e5db39 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2002-10-28 Larry Ewing + + * mail-format.c (handle_multipart_mixed): instead of bailing with + an assertion dump the body. + 2002-10-27 Larry Ewing * mail-display.c (fetch_next): don't queue the action until we've diff --git a/mail/mail-format.c b/mail/mail-format.c index 440b90ef77..5421d4cd40 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -697,11 +697,8 @@ format_mime_part (CamelMimePart *part, MailDisplay *md, if (CAMEL_IS_MULTIPART (wrapper) && camel_multipart_get_number (CAMEL_MULTIPART (wrapper)) == 0) { - char *mesg; - mesg = e_utf8_from_locale_string (_("Could not parse MIME message. Displaying as source.")); - mail_error_printf (html, stream, "\n%s\n", mesg); - g_free (mesg); + mail_error_printf (html, stream, "\n%s\n", U_("Could not parse MIME message. Displaying as source.")); if (mail_content_loaded (wrapper, md, TRUE, NULL, html, NULL)) handle_text_plain (part, "text/plain", md, html, stream); return TRUE; @@ -1729,7 +1726,13 @@ handle_multipart_mixed (CamelMimePart *part, const char *mime_type, int i, nparts; gboolean output = FALSE; - g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE); + if (!CAMEL_IS_MULTIPART (wrapper)) { + mail_error_printf (html, stream, "\n%s\n", U_("Could not parse MIME message. Displaying as source.")); + if (mail_content_loaded (wrapper, md, TRUE, NULL, html, NULL)) + handle_text_plain (part, "text/plain", md, html, stream); + return TRUE; + } + mp = CAMEL_MULTIPART (wrapper); nparts = camel_multipart_get_number (mp); -- cgit v1.2.3