aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c16
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c4
2 files changed, 5 insertions, 15 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index c1920bdd1c..a22c273c2d 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -856,19 +856,9 @@ _get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
((CamelMboxMessageContentInfo *)info->info.content)->pos,
((CamelMboxMessageContentInfo *)info->info.content)->endpos);
message = camel_mime_message_new();
-#if 1
- {
- CamelMimeParser *parser;
-
- parser = camel_mime_parser_new();
- camel_mime_parser_init_with_stream(parser, message_stream);
- camel_data_wrapper_construct_from_parser(message, parser);
- gtk_object_unref((GtkObject *)parser);
- gtk_object_unref((GtkObject *)message_stream);
- }
-#else
- camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (message), message_stream);
-#endif
+ camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream);
+ gtk_object_unref((GtkObject *)message_stream);
+
/* init other fields? */
message->folder = folder;
gtk_object_ref((GtkObject *)folder);
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index cf0d1763d3..7653dbdb6b 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -208,8 +208,8 @@ get_message_by_number (CamelFolder *folder, gint number, CamelException *ex)
msgstream = camel_stream_mem_new_with_buffer (body, strlen (body),
CAMEL_STREAM_MEM_READ);
msg = camel_mime_message_new ();
- camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (msg),
- msgstream);
+ camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
+ msgstream);
return msg;
}