aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-30 06:16:23 +0800
committerDan Winship <danw@src.gnome.org>2001-03-30 06:16:23 +0800
commitb912dd5436413b55dc4500dd7d2b8afcdd433727 (patch)
tree5a7f549f2c671388cffa1503b68fc7fc7e417c39
parent75d381c72b37763ede1552972d17c237bc8de326 (diff)
downloadgsoc2013-evolution-b912dd5436413b55dc4500dd7d2b8afcdd433727.tar
gsoc2013-evolution-b912dd5436413b55dc4500dd7d2b8afcdd433727.tar.gz
gsoc2013-evolution-b912dd5436413b55dc4500dd7d2b8afcdd433727.tar.bz2
gsoc2013-evolution-b912dd5436413b55dc4500dd7d2b8afcdd433727.tar.lz
gsoc2013-evolution-b912dd5436413b55dc4500dd7d2b8afcdd433727.tar.xz
gsoc2013-evolution-b912dd5436413b55dc4500dd7d2b8afcdd433727.tar.zst
gsoc2013-evolution-b912dd5436413b55dc4500dd7d2b8afcdd433727.zip
if called with a multipart that's really a 0-part, spew an error and
* mail-format.c (call_handler_function): if called with a multipart that's really a 0-part, spew an error and display as source. svn path=/trunk/; revision=9031
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-format.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index fd238d93a3..0b785db609 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2001-03-29 Dan Winship <danw@ximian.com>
+ * mail-format.c (call_handler_function): if called with a
+ multipart that's really a 0-part, spew an error and display as
+ source.
+
* message-list.c: #include <camel/camel-vtrash-folder.h>
* mail-callbacks.c: #include <libgnome/gnome-paper.h>
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 6cc6cccc1c..53ba0dd57d 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -548,6 +548,15 @@ call_handler_function (CamelMimePart *part, MailDisplay *md)
gboolean output, is_inline;
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+
+ if (CAMEL_IS_MULTIPART (wrapper) &&
+ camel_multipart_get_number (CAMEL_MULTIPART (wrapper)) == 0) {
+ mail_error_write (md->html, md->stream, _("Could not parse MIME message. Displaying as source."));
+ if (mail_content_loaded (wrapper, md))
+ handle_text_plain (part, "text/plain", md);
+ return TRUE;
+ }
+
mime_type = camel_data_wrapper_get_mime_type (wrapper);
g_strdown (mime_type);