Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3395:5573554dce0c HEAD
Don't remove output handler if flush_pending is still set after callback.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 28 May 2005 14:31:19 +0300 |
parents | 30099e1ccf97 |
children | a176b7d20895 |
files | src/lib/ostream-file.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/ostream-file.c Sat May 28 14:20:49 2005 +0300 +++ b/src/lib/ostream-file.c Sat May 28 14:31:19 2005 +0300 @@ -361,13 +361,15 @@ else ret = _flush(&fstream->ostream); - if (ret > 0 && IS_STREAM_EMPTY(fstream) && fstream->io != NULL) { + if (ret == 0) + fstream->flush_pending = TRUE; + + if (!fstream->flush_pending && + IS_STREAM_EMPTY(fstream) && fstream->io != NULL) { /* all sent */ io_remove(fstream->io); fstream->io = NULL; } - if (ret == 0) - fstream->flush_pending = TRUE; o_stream_unref(&fstream->ostream.ostream); }