Mercurial > dovecot > core-2.2
changeset 595:320f59a5a36c HEAD
A bit kludgy bugfix to prevent rawlog from hanging.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 06 Nov 2002 15:06:56 +0200 |
parents | 7a53aa3bd95d |
children | ab3590c3a7d9 |
files | src/imap/rawlog.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/rawlog.c Wed Nov 06 13:37:37 2002 +0200 +++ b/src/imap/rawlog.c Wed Nov 06 15:06:56 2002 +0200 @@ -5,6 +5,7 @@ #ifdef BUILD_RAWLOG #include "ioloop.h" +#include "network.h" #include "rawlog.h" #include "write-full.h" @@ -23,6 +24,7 @@ char buf[1024]; ssize_t r_ret, s_ret; + net_set_nonblock(in, TRUE); r_ret = read(in, buf, sizeof(buf)); if (r_ret <= 0) { if (r_ret < 0) @@ -36,6 +38,7 @@ if (write_full(log, buf, r_ret) < 0) i_fatal("Can't write to log file: %m"); + net_set_nonblock(out, FALSE); do { s_ret = write(out, buf, r_ret); if (s_ret <= 0) {