From 1f607a46c3b950f00be5190c0f803526764cb4d4 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 14 Aug 2003 04:35:22 +0000 Subject: Save errno when flushing/unreffing the filter stream. 2003-08-14 Jeffrey Stedfast * camel-mime-part.c (write_to_stream): Save errno when flushing/unreffing the filter stream. svn path=/trunk/; revision=22227 --- camel/camel-mime-part.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'camel/camel-mime-part.c') diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 5fdfac5ef8..81036c0571 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -629,12 +629,13 @@ write_to_stream (CamelDataWrapper *dw, CamelStream *stream) CamelDataWrapper *content; ssize_t total = 0; ssize_t count; - + int errnosav; + d(printf("mime_part::write_to_stream\n")); - + /* FIXME: something needs to be done about this ... */ /* TODO: content-languages header? */ - + if (mp->headers) { struct _header_raw *h = mp->headers; char *val; @@ -746,8 +747,10 @@ write_to_stream (CamelDataWrapper *dw, CamelStream *stream) count = camel_data_wrapper_write_to_stream (content, stream); if (filter_stream) { + errnosav = errno; camel_stream_flush (stream); camel_object_unref (filter_stream); + errno = errnosav; } if (count == -1) -- cgit