dovecot-1.2: pgsql: We hadn't called PQsetnonblocking().

dovecot at dovecot.org dovecot at dovecot.org
Thu May 7 22:04:18 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/7ccc533e30bb
changeset: 9019:7ccc533e30bb
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 07 15:04:12 2009 -0400
description:
pgsql: We hadn't called PQsetnonblocking().

diffstat:

1 file changed, 2 insertions(+)
src/lib-sql/driver-pgsql.c |    2 ++

diffs (12 lines):

diff -r 0bb192fe0abd -r 7ccc533e30bb src/lib-sql/driver-pgsql.c
--- a/src/lib-sql/driver-pgsql.c	Mon May 04 16:43:59 2009 -0400
+++ b/src/lib-sql/driver-pgsql.c	Thu May 07 15:04:12 2009 -0400
@@ -194,6 +194,8 @@ static int driver_pgsql_connect(struct s
 		return -1;
 	} else {
 		/* nonblocking connecting begins. */
+		if (PQsetnonblocking(db->pg, 1) < 0)
+			i_error("pgsql: PQsetnonblocking() failed");
 		db->io = io_add(PQsocket(db->pg), IO_WRITE,
 				connect_callback, db);
 		db->io_dir = IO_WRITE;


More information about the dovecot-cvs mailing list