summaryrefslogtreecommitdiff
path: root/examples/mimetest.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mimetest.c')
-rw-r--r--examples/mimetest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/mimetest.c b/examples/mimetest.c
index bca97af28..923e4d0ff 100644
--- a/examples/mimetest.c
+++ b/examples/mimetest.c
@@ -251,7 +251,10 @@ message_display_parts (mu_message_t msg, int indent)
printf ("%*.*sBegin\n", indent, indent, "");
mu_message_get_body (part, &body);
mu_body_get_stream (body, &str);
- mu_filter_create (&str, str, encoding, 0, 0);
+ /* Make sure the original body stream is not closed when
+ str gets destroyed */
+ mu_filter_create (&str, str, encoding, MU_FILTER_DECODE,
+ MU_STREAM_READ | MU_STREAM_NO_CLOSE);
offset = 0;
while (mu_stream_readline (str, buf, sizeof (buf),
offset, &nbytes) == 0 && nbytes)

Return to:

Send suggestions and report system problems to the System administrator.