dovecot-1.2: ldap: Fixed hang when >128 requests were sent at once.

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 7 21:45:08 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/a8bd5b0b6bb9
changeset: 9290:a8bd5b0b6bb9
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 07 14:44:58 2009 -0400
description:
ldap: Fixed hang when >128 requests were sent at once.
Based on patch by Marek Miska.

diffstat:

1 file changed, 2 insertions(+), 3 deletions(-)
src/auth/db-ldap.c |    5 ++---

diffs (20 lines):

diff -r e57d5c9daed3 -r a8bd5b0b6bb9 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Fri Aug 07 14:21:40 2009 -0400
+++ b/src/auth/db-ldap.c	Fri Aug 07 14:44:58 2009 -0400
@@ -322,14 +322,13 @@ static bool db_ldap_request_queue_next(s
 static bool db_ldap_request_queue_next(struct ldap_connection *conn)
 {
 	struct ldap_request *const *requestp, *request;
-	unsigned int queue_size = aqueue_count(conn->request_queue);
 	int ret = -1;
 
-	if (conn->pending_count == queue_size) {
+	if (conn->pending_count == aqueue_count(conn->request_queue)) {
 		/* no non-pending requests */
 		return FALSE;
 	}
-	if (queue_size > DB_LDAP_MAX_PENDING_REQUESTS) {
+	if (conn->pending_count > DB_LDAP_MAX_PENDING_REQUESTS) {
 		/* wait until server has replied to some requests */
 		return FALSE;
 	}


More information about the dovecot-cvs mailing list