[dovecot-cvs] dovecot/src/lib-sql driver-pgsql.c,1.19,1.20
tss at dovecot.org
tss at dovecot.org
Tue Apr 3 08:11:50 EEST 2007
- Previous message: [dovecot-cvs] dovecot/src/lib-sql driver-pgsql.c,1.18,1.19
- Next message: [dovecot-cvs] dovecot/src/lib-sql driver-mysql.c, 1.25, 1.26 driver-pgsql.c, 1.20, 1.21 driver-sqlite.c, 1.8, 1.9 sql-api-private.h, 1.9, 1.10 sql-api.c, 1.14, 1.15 sql-api.h, 1.13, 1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-sql
In directory talvi:/tmp/cvs-serv8272
Modified Files:
driver-pgsql.c
Log Message:
If trying to escape a string before being connected, connect first.
Index: driver-pgsql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-sql/driver-pgsql.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- driver-pgsql.c 3 Apr 2007 05:10:05 -0000 1.19
+++ driver-pgsql.c 3 Apr 2007 05:11:48 -0000 1.20
@@ -452,6 +452,10 @@
to = t_buffer_get(len * 2 + 1);
#ifdef HAVE_PQESCAPE_STRING_CONN
+ if (!db->connected) {
+ /* try connecting again */
+ (void)driver_pgsql_connect(&db->api);
+ }
len = PQescapeStringConn(db->pg, to, string, len, NULL);
#else
len = PQescapeString(to, string, len);
- Previous message: [dovecot-cvs] dovecot/src/lib-sql driver-pgsql.c,1.18,1.19
- Next message: [dovecot-cvs] dovecot/src/lib-sql driver-mysql.c, 1.25, 1.26 driver-pgsql.c, 1.20, 1.21 driver-sqlite.c, 1.8, 1.9 sql-api-private.h, 1.9, 1.10 sql-api.c, 1.14, 1.15 sql-api.h, 1.13, 1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list