aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-02 04:30:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-02 04:30:15 +0800
commitffb7357c4201f9e02c54d712267856c5a313e6cd (patch)
tree392034371c6bb17a1890b2eb6c3951600f0d59f5
parenta226b2ae8616f2047c0d3ab4e7a2cc739972cd71 (diff)
downloadgsoc2013-evolution-ffb7357c4201f9e02c54d712267856c5a313e6cd.tar.gz
gsoc2013-evolution-ffb7357c4201f9e02c54d712267856c5a313e6cd.tar.zst
gsoc2013-evolution-ffb7357c4201f9e02c54d712267856c5a313e6cd.zip
Reverted my pgp/mime fixes here too.
2002-03-01 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Reverted my pgp/mime fixes here too. * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw stream hack, this is causing problems such as some messages to not displaying, view->source not working at all, etc. svn path=/trunk/; revision=15883
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/camel-mime-part-utils.c29
-rw-r--r--camel/camel-mime-part.c16
-rw-r--r--camel/camel-mime-part.h2
4 files changed, 12 insertions, 45 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index aac0e1b5a1..1ba9ec8617 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,13 @@
+2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-mime-part-utils.c
+ (camel_mime_part_construct_content_from_parser): Reverted my
+ pgp/mime fixes here too.
+
+ * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
+ stream hack, this is causing problems such as some messages to not
+ displaying, view->source not working at all, etc.
+
2002-02-28 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-parser.c: Changed offset variables from int's to
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 3b93fab686..024eec091e 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -313,24 +313,10 @@ simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser
void
camel_mime_part_construct_content_from_parser (CamelMimePart *dw, CamelMimeParser *mp)
{
- struct _header_content_type *content_type;
CamelDataWrapper *content = NULL;
- CamelMimeFilter *save_filter;
- CamelStream *raw = NULL;
- int saveid = -1;
char *buf;
int len;
- content_type = camel_mime_parser_content_type (mp);
-
-#define SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES
-#ifdef SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES
- raw = camel_stream_mem_new ();
- save_filter = camel_mime_filter_save_new_with_stream (raw);
- saveid = camel_mime_parser_filter_add (mp, save_filter);
- camel_object_unref (CAMEL_OBJECT (save_filter));
-#endif /* SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES */
-
switch (camel_mime_parser_state (mp)) {
case HSCAN_HEADER:
d(printf("Creating body part\n"));
@@ -343,17 +329,15 @@ camel_mime_part_construct_content_from_parser (CamelMimePart *dw, CamelMimeParse
camel_mime_part_construct_from_parser ((CamelMimePart *)content, mp);
break;
case HSCAN_MULTIPART: {
+ struct _header_content_type *content_type;
CamelDataWrapper *bodypart;
/* FIXME: we should use a came-mime-mutlipart, not jsut a camel-multipart, but who cares */
d(printf("Creating multi-part\n"));
- /* we don't need to save raw streams for multiparts */
- camel_object_unref (CAMEL_OBJECT (raw));
- camel_mime_parser_filter_remove (mp, saveid);
-
content = (CamelDataWrapper *)camel_multipart_new ();
+ content_type = camel_mime_parser_content_type (mp);
camel_multipart_set_boundary ((CamelMultipart *)content,
header_content_type_param (content_type, "boundary"));
@@ -381,13 +365,4 @@ camel_mime_part_construct_content_from_parser (CamelMimePart *dw, CamelMimeParse
camel_medium_set_content_object ((CamelMedium *)dw, content);
camel_object_unref ((CamelObject *)content);
}
-
-#ifdef SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES
- if (!CAMEL_IS_MULTIPART (content)) {
- /* set the raw mime stream on this leaf part in case our parent is a multipart/signed */
- camel_mime_parser_filter_remove (mp, saveid);
- camel_stream_reset (raw);
- dw->stream = raw;
- }
-#endif /* SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES */
}
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index c7b21e460d..614ba186b8 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -156,7 +156,6 @@ camel_mime_part_init (gpointer object, gpointer klass)
CamelMimePart *camel_mime_part = CAMEL_MIME_PART (object);
camel_mime_part->content_type = header_content_type_new ("text", "plain");
- camel_mime_part->stream = NULL;
camel_mime_part->description = NULL;
camel_mime_part->disposition = NULL;
camel_mime_part->content_id = NULL;
@@ -172,9 +171,6 @@ camel_mime_part_finalize (CamelObject *object)
{
CamelMimePart *mime_part = CAMEL_MIME_PART (object);
- if (mime_part->stream)
- camel_object_unref (CAMEL_OBJECT (mime_part->stream));
-
g_free (mime_part->description);
g_free (mime_part->content_id);
g_free (mime_part->content_MD5);
@@ -671,18 +667,6 @@ write_to_stream(CamelDataWrapper *data_wrapper, CamelStream *stream)
if (count == -1)
return -1;
total += count;
-
-#define SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES
-#ifdef SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES
- if (mp->stream) {
- count = camel_stream_write_to_stream (mp->stream, stream);
- camel_stream_reset (mp->stream);
- if (count == -1)
- return -1;
-
- return total + count;
- }
-#endif /* SAVE_RAW_MIME_STREAM_FOR_SECURE_MIME_SIGNATURES */
content = camel_medium_get_content_object(medium);
if (content) {
diff --git a/camel/camel-mime-part.h b/camel/camel-mime-part.h
index 524371a521..4f05ecb71b 100644
--- a/camel/camel-mime-part.h
+++ b/camel/camel-mime-part.h
@@ -65,8 +65,6 @@ struct _CamelMimePart
struct _header_raw *headers; /* mime headers */
/* All fields here are -** PRIVATE **- */
- CamelStream *stream;
-
char *description;
CamelMimeDisposition *disposition;
char *content_id;