summaryrefslogtreecommitdiff
path: root/mailbox/streamref.c
diff options
context:
space:
mode:
Diffstat (limited to 'mailbox/streamref.c')
-rw-r--r--mailbox/streamref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mailbox/streamref.c b/mailbox/streamref.c
index dad96c6dc..2ce35a4bc 100644
--- a/mailbox/streamref.c
+++ b/mailbox/streamref.c
@@ -140,8 +140,6 @@ static int
_streamref_close (struct _mu_stream *str)
{
struct _mu_streamref *sp = (struct _mu_streamref *)str;
- if (sp->stream.flags & MU_STREAM_NO_CLOSE)
- return 0;
return streamref_return (sp, mu_stream_close (sp->transport));
}
@@ -271,9 +269,11 @@ mu_streamref_create_abridged (mu_stream_t *pref, mu_stream_t str,
if (rc)
return rc;
mu_stream_get_flags (str, &flags);
- sp = (struct _mu_streamref *) _mu_stream_create (sizeof (*sp), flags);
+ sp = (struct _mu_streamref *)
+ _mu_stream_create (sizeof (*sp), flags & ~MU_STREAM_AUTOCLOSE);
if (!sp)
return ENOMEM;
+
mu_stream_ref (str);
sp->stream.read = _streamref_read;

Return to:

Send suggestions and report system problems to the System administrator.