dovecot-2.2: lib: connection: Connect to unix socket asynchronou...

dovecot at dovecot.org dovecot at dovecot.org
Wed Apr 29 09:22:44 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/092a51d80bad
changeset: 18493:092a51d80bad
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sat Apr 25 11:42:06 2015 +0200
description:
lib: connection: Connect to unix socket asynchronously if connected callback is set.
Prevents problems in lib-http unix socket support.

diffstat:

 src/lib/connection.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r 1081d57b524e -r 092a51d80bad src/lib/connection.c
--- a/src/lib/connection.c	Wed Apr 29 10:34:33 2015 +0200
+++ b/src/lib/connection.c	Sat Apr 25 11:42:06 2015 +0200
@@ -236,7 +236,7 @@
 		list->v.client_connected(conn, TRUE);
 }
 
-static void connection_ip_connected(struct connection *conn)
+static void connection_socket_connected(struct connection *conn)
 {
 	io_remove(&conn->io);
 	if (conn->to != NULL)
@@ -262,9 +262,9 @@
 		return -1;
 	conn->fd_in = conn->fd_out = fd;
 
-	if (conn->port != 0) {
+	if (conn->port != 0 || conn->list->v.client_connected != NULL) {
 		conn->io = io_add(conn->fd_out, IO_WRITE,
-				  connection_ip_connected, conn);
+				  connection_socket_connected, conn);
 		if (set->client_connect_timeout_msecs != 0) {
 			conn->to = timeout_add(set->client_connect_timeout_msecs,
 					       connection_connect_timeout, conn);


More information about the dovecot-cvs mailing list