[dovecot-cvs] dovecot/src/lib-sql driver-pgsql.c,1.14,1.15

tss at dovecot.org tss at dovecot.org
Wed Mar 7 01:36:54 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-sql
In directory talvi:/tmp/cvs-serv8467

Modified Files:
	driver-pgsql.c 
Log Message:
Queueing code was somewhat broken and caused queries to get lost.



Index: driver-pgsql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-sql/driver-pgsql.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- driver-pgsql.c	15 Dec 2006 18:38:15 -0000	1.14
+++ driver-pgsql.c	6 Mar 2007 23:36:52 -0000	1.15
@@ -362,6 +362,9 @@
 	queue = db->queue;
 	db->queue = queue->next;
 
+	if (db->queue == NULL)
+		db->queue_tail = &db->queue;
+
 	send_query(queue->result, queue->query);
 
 	i_free(queue->query);
@@ -397,6 +400,7 @@
 	queue->result = result;
 
 	*db->queue_tail = queue;
+	db->queue_tail = &queue->next;
 
 	if (db->queue_to == NULL)
 		db->queue_to = timeout_add(5000, queue_timeout, db);



More information about the dovecot-cvs mailing list