diff options
author | Larry Ewing <lewing@ximian.com> | 2002-10-29 02:01:13 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2002-10-29 02:01:13 +0800 |
commit | 4c7be2715ddfb225a4e199c61e86522665c4e14f (patch) | |
tree | 6321c72dca3512ae89f16abbc462dda000f570fd /mail | |
parent | 89432ccb7deb09fdfcac281b174232baf34a99b7 (diff) | |
download | gsoc2013-evolution-4c7be2715ddfb225a4e199c61e86522665c4e14f.tar.gz gsoc2013-evolution-4c7be2715ddfb225a4e199c61e86522665c4e14f.tar.zst gsoc2013-evolution-4c7be2715ddfb225a4e199c61e86522665c4e14f.zip |
instead of bailing with an assertion dump the body.
2002-10-28 Larry Ewing <lewing@ximian.com>
* mail-format.c (handle_multipart_mixed): instead of bailing with
an assertion dump the body.
(handle_multipart_signed): same.
(handle_multipart_alternative): same.
(handle_multipart_appledouble): same.
svn path=/trunk/; revision=18462
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mail-format.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c index 5421d4cd40..7590e717be 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1801,8 +1801,13 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type, wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part)); - g_return_val_if_fail (CAMEL_IS_MULTIPART_SIGNED (wrapper), FALSE); - + if (!CAMEL_IS_MULTIPART_SIGNED (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; + } + mps = CAMEL_MULTIPART_SIGNED (wrapper); /* if subpart & signature is null, what do we do? just write it out raw? @@ -1916,8 +1921,13 @@ handle_multipart_related (CamelMimePart *part, const char *mime_type, GHashTable *related_save; int ret; - 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); @@ -2036,7 +2046,12 @@ handle_multipart_alternative (CamelMimePart *part, const char *mime_type, CamelMultipart *multipart; CamelMimePart *mime_part; - 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; + } multipart = CAMEL_MULTIPART (wrapper); @@ -2056,8 +2071,13 @@ handle_multipart_appledouble (CamelMimePart *part, const char *mime_type, camel_medium_get_content_object (CAMEL_MEDIUM (part)); CamelMultipart *multipart; - 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; + } + multipart = CAMEL_MULTIPART (wrapper); /* The first part is application/applefile and is not useful |