From 41694524a6b39908c8c7a5e298f252c488416afd Mon Sep 17 00:00:00 2001 From: bertrand Date: Fri, 3 Mar 2000 22:26:13 +0000 Subject: use set_input_stream instead of construct_from_stream to feed the message 2000-03-03 bertrand * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): use set_input_stream instead of construct_from_stream to feed the message object. * camel-data-wrapper.c (my_write_to_stream): reset output stream. (my_set_input_stream): unref the previous input stream. use the set_output_stream for default behaviour. (my_set_output_stream): unref previous output stream. * camel-mime-part.c (my_write_content_to_stream): reset content object output stream. mbox provider now also constructs message bodies. I should have looked here first. damn. svn path=/trunk/; revision=2030 --- camel/camel-simple-data-wrapper.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'camel/camel-simple-data-wrapper.c') diff --git a/camel/camel-simple-data-wrapper.c b/camel/camel-simple-data-wrapper.c index a1822e8bcf..2b603d5ef3 100644 --- a/camel/camel-simple-data-wrapper.c +++ b/camel/camel-simple-data-wrapper.c @@ -138,12 +138,14 @@ my_write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) g_assert (data_wrapper); g_assert (stream); - g_assert (simple_data_wrapper->byte_array); + array = simple_data_wrapper->byte_array; - if (array->len) + if ( array && array->len) camel_stream_write (stream, (gchar *)array->data, array->len); + else + parent_class->write_to_stream (data_wrapper, stream); - CAMEL_LOG_FULL_DEBUG ("CamelSimpleDataWrapper:: Leaving my_write_to_stream\n"); + CAMEL_LOG_FULL_DEBUG ("CamelSimpleDataWrapper:: Leaving my_write_to_stream\n"); } -- cgit v1.2.3