aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2002-02-28 11:09:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-02-28 11:09:07 +0800
commitdfee77a151eef9464f596cf22ec6e5226550f1b2 (patch)
tree6dd21cb469ce5e92125849c39f1c793ba38b9340 /camel
parente1fa571225dcf92a75e3ff4a84c7153e32b3664f (diff)
downloadgsoc2013-evolution-dfee77a151eef9464f596cf22ec6e5226550f1b2.tar.gz
gsoc2013-evolution-dfee77a151eef9464f596cf22ec6e5226550f1b2.tar.zst
gsoc2013-evolution-dfee77a151eef9464f596cf22ec6e5226550f1b2.zip
only save raw streams for leaf parts.
svn path=/trunk/; revision=15868
Diffstat (limited to 'camel')
-rw-r--r--camel/camel-mime-part-utils.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index ddd71da90c..e21152951b 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -360,8 +360,15 @@ camel_mime_part_construct_content_from_parser (CamelMimePart *dw, CamelMimeParse
#ifdef SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES
if (raw) {
/* set the raw mime stream on the first part within the multipart/signed */
- camel_stream_reset (raw);
- CAMEL_MIME_PART (bodypart)->stream = raw;
+ CamelDataWrapper *content_object;
+
+ content_object = camel_medium_get_content_object (CAMEL_MEDIUM (bodypart));
+ if (!CAMEL_IS_MULTIPART (content_object)) {
+ camel_stream_reset (raw);
+ CAMEL_MIME_PART (bodypart)->stream = raw;
+ } else {
+ camel_object_unref (CAMEL_OBJECT (raw));
+ }
camel_mime_parser_filter_remove (mp, saveid);
saveid = -1;
raw = NULL;