dovecot-1.1: ldap: Fixed hang when >128 requests were sent at once.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Aug 8 02:48:24 EEST 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/9954461eda42
changeset: 8342:9954461eda42
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 f1affd2d0251 -r 9954461eda42 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c Fri Aug 07 16:54:36 2009 -0400
+++ b/src/auth/db-ldap.c Fri Aug 07 14:44:58 2009 -0400
@@ -311,14 +311,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