dovecot: More fixes to handling driver_pgsql_query_s() when not ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Nov 12 19:23:59 EET 2007
details: http://hg.dovecot.org/dovecot/rev/7005fc7e69dc
changeset: 6792:7005fc7e69dc
user: Timo Sirainen <tss at iki.fi>
date: Mon Nov 12 19:23:55 2007 +0200
description:
More fixes to handling driver_pgsql_query_s() when not connected.
diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
src/lib-sql/driver-pgsql.c | 12 ++++++++----
diffs (25 lines):
diff -r 4d6ba6cd1bbc -r 7005fc7e69dc src/lib-sql/driver-pgsql.c
--- a/src/lib-sql/driver-pgsql.c Mon Nov 12 19:16:30 2007 +0200
+++ b/src/lib-sql/driver-pgsql.c Mon Nov 12 19:23:55 2007 +0200
@@ -574,13 +574,17 @@ driver_pgsql_query_s(struct sql_db *_db,
driver_pgsql_query(_db, query, pgsql_query_s_callback, db);
if (!db->query_finished) {
- if (db->connected)
+ if (db->connected || db->connecting)
io_loop_run(db->ioloop);
- else {
- if (db->queue_to != NULL)
- timeout_remove(&db->queue_to);
+ else
queue_abort_next(db);
+
+ if (db->io != NULL) {
+ i_assert(db->sync_result == &sql_not_connected_result);
+ io_remove(&db->io);
}
+ if (db->queue_to != NULL)
+ timeout_remove(&db->queue_to);
}
io_loop_destroy(&db->ioloop);
More information about the dovecot-cvs
mailing list