[dovecot-cvs] dovecot/src/lib-sql driver-pgsql.c,1.17,1.18
tss at dovecot.org
tss at dovecot.org
Tue Apr 3 08:09:27 EEST 2007
Update of /var/lib/cvs/dovecot/src/lib-sql
In directory talvi:/tmp/cvs-serv8164
Modified Files:
driver-pgsql.c
Log Message:
If reply is received from server before going to ioloop, don't hang.
Index: driver-pgsql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-sql/driver-pgsql.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- driver-pgsql.c 8 Mar 2007 22:08:34 -0000 1.17
+++ driver-pgsql.c 3 Apr 2007 05:09:25 -0000 1.18
@@ -31,6 +31,7 @@
unsigned int connecting:1;
unsigned int connected:1;
unsigned int querying:1;
+ unsigned int query_finished:1;
};
struct pgsql_result {
@@ -489,6 +490,7 @@
{
struct pgsql_db *db = context;
+ db->query_finished = TRUE;
db->sync_result = result;
io_loop_stop(db->ioloop);
}
@@ -512,9 +514,11 @@
old_io.callback, old_io.context);
}
+ db->query_finished = FALSE;
driver_pgsql_query(_db, query, pgsql_query_s_callback, db);
- io_loop_run(db->ioloop);
+ if (!db->query_finished)
+ io_loop_run(db->ioloop);
io_loop_destroy(&db->ioloop);
i_assert(db->io == NULL);
More information about the dovecot-cvs
mailing list