dovecot-2.0: ldap: Fixed hang when >128 requests were sent at once.
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 7 21:57:56 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/c5cdc49d5138
changeset: 9742:c5cdc49d5138
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 60b76a35bb2c -r c5cdc49d5138 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
@@ -327,14 +327,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