]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: o_stream_create_rawlog_from_stream() should preserve the output stream fd.
authorTimo Sirainen <tss@iki.fi>
Fri, 20 Mar 2015 19:01:08 +0000 (21:01 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 20 Mar 2015 19:01:08 +0000 (21:01 +0200)
ostream-rawlog is just a passthrough stream after all.

src/lib/ostream-rawlog.c

index 7df2ba9f5685da8e3e4b24b790c69bab8f5b5762..24aadc4eb7493476089711283f95496d85f88c69 100644 (file)
@@ -80,5 +80,6 @@ o_stream_create_rawlog_from_stream(struct ostream *output,
 
        rstream->riostream.rawlog_output = rawlog_output;
        iostream_rawlog_init(&rstream->riostream, flags, FALSE);
-       return o_stream_create(&rstream->ostream, output, -1);
+       return o_stream_create(&rstream->ostream, output,
+                              o_stream_get_fd(output));
 }