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

dovecot at dovecot.org dovecot at dovecot.org
Thu May 7 21:45:17 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/0f03cd2679c6
changeset: 9248:0f03cd2679c6
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 07 14:45:11 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 cbade54216a6 -r 0f03cd2679c6 src/lib-sql/driver-pgsql.c
--- a/src/lib-sql/driver-pgsql.c	Wed May 06 18:33:17 2009 -0400
+++ b/src/lib-sql/driver-pgsql.c	Thu May 07 14:45:11 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