dovecot-2.0-sslstream: rawlog: Make sure to set fds nonblocking ...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 13 02:55:56 EET 2010
details: http://hg.dovecot.org/dovecot-2.0-sslstream/rev/4ba2db4794ab
changeset: 10239:4ba2db4794ab
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 30 14:54:02 2009 -0400
description:
rawlog: Make sure to set fds nonblocking to avoid hangs.
diffstat:
1 file changed, 4 insertions(+)
src/util/rawlog.c | 4 ++++
diffs (21 lines):
diff -r b0cdefe35909 -r 4ba2db4794ab src/util/rawlog.c
--- a/src/util/rawlog.c Fri Oct 30 14:40:01 2009 -0400
+++ b/src/util/rawlog.c Fri Oct 30 14:54:02 2009 -0400
@@ -3,6 +3,7 @@
#include "lib.h"
#include "ioloop.h"
+#include "fd-set-nonblock.h"
#include "network.h"
#include "write-full.h"
#include "istream.h"
@@ -263,6 +264,9 @@ rawlog_proxy_create(int client_in_fd, in
proxy->client_io = io_add(proxy->client_in_fd, IO_READ,
client_input, proxy);
o_stream_set_flush_callback(proxy->client_output, client_output, proxy);
+
+ fd_set_nonblock(client_in_fd, TRUE);
+ fd_set_nonblock(client_out_fd, TRUE);
proxy->last_out_lf = TRUE;
proxy->flags = flags;
More information about the dovecot-cvs
mailing list