aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-mime-part.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b1e3b95563..406d9428b2 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-14 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-mime-part.c (write_to_stream): Save errno when
+ flushing/unreffing the filter stream.
+
2003-08-13 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-part.c (write_to_stream): If the content is
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)