Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib/istream.c @ 4070:71b8faa84ec6 HEAD
Added i_stream_destroy() and o_stream_destroy() and used them instead of
*_stream_unref() where possible. Fixes at least one problem with io_remove()
being called after socket was closed, which caused problems with epoll.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 26 Feb 2006 12:04:59 +0200 |
parents | 928229f8b3e6 |
children | 1a35d53c18fc |
line wrap: on
line diff
--- a/src/lib/istream.c Sat Feb 25 13:29:05 2006 +0200 +++ b/src/lib/istream.c Sun Feb 26 12:04:59 2006 +0200 @@ -5,6 +5,12 @@ #include "str.h" #include "istream-internal.h" +void i_stream_destroy(struct istream **stream) +{ + i_stream_close(*stream); + i_stream_unref(stream); +} + void i_stream_ref(struct istream *stream) { _io_stream_ref(&stream->real_stream->iostream);