From: Timo Sirainen Date: Sat, 7 Jun 2008 02:10:26 +0000 (+0300) Subject: If writing to log failed with EAGAIN (shouldn't normally happen), waiting X-Git-Tag: 1.2.alpha1~363^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55804e9eb14ab16e5bb3c83ba675f9fa321fe3a9;p=thirdparty%2Fdovecot%2Fcore.git If writing to log failed with EAGAIN (shouldn't normally happen), waiting for the log fd to be writable again was buggy. --HG-- branch : HEAD --- diff --git a/src/lib/failures.c b/src/lib/failures.c index 235fe7f611..d7ed550894 100644 --- a/src/lib/failures.c +++ b/src/lib/failures.c @@ -98,7 +98,7 @@ static int log_fd_write(int fd, const unsigned char *data, unsigned int len) /* wait until we can write more. this can happen at least when writing to terminal, even if fd is blocking. */ ioloop = io_loop_create(); - io = io_add(IO_WRITE, fd, log_fd_flush_stop, ioloop); + io = io_add(fd, IO_WRITE, log_fd_flush_stop, ioloop); io_loop_run(ioloop); io_remove(&io); io_loop_destroy(&ioloop);