dovecot-2.0: auth: Removed max. request queue limit from LDAP.

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 12 17:05:51 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/56616bad7310
changeset: 12733:56616bad7310
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 12 17:05:49 2011 +0300
description:
auth: Removed max. request queue limit from LDAP.
Old requests get dropped after 60 seconds, but other than that there is
probably not much point in having a hard coded limit.

diffstat:

 src/auth/db-ldap.c |  9 +--------
 src/auth/db-ldap.h |  2 --
 2 files changed, 1 insertions(+), 10 deletions(-)

diffs (38 lines):

diff -r 475e6633b1d7 -r 56616bad7310 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Sun Apr 10 13:54:06 2011 +0300
+++ b/src/auth/db-ldap.c	Tue Apr 12 17:05:49 2011 +0300
@@ -414,13 +414,6 @@
 		ldap_conn_reconnect(conn);
 		return TRUE;
 	}
-	if (conn->request_queue->full && count >= DB_LDAP_MAX_QUEUE_SIZE) {
-		/* Queue is full already, fail this request */
-		auth_request_log_error(request->auth_request, "ldap",
-			"Request queue is full (oldest added %d secs ago)",
-			(int)secs_diff);
-		return FALSE;
-	}
 	return TRUE;
 }
 
@@ -1313,7 +1306,7 @@
         conn->set.ldap_deref = deref2str(conn->set.deref);
 	conn->set.ldap_scope = scope2str(conn->set.scope);
 
-	i_array_init(&conn->request_array, DB_LDAP_MAX_QUEUE_SIZE);
+	i_array_init(&conn->request_array, 512);
 	conn->request_queue = aqueue_init(&conn->request_array.arr);
 
 	conn->next = ldap_connections;
diff -r 475e6633b1d7 -r 56616bad7310 src/auth/db-ldap.h
--- a/src/auth/db-ldap.h	Sun Apr 10 13:54:06 2011 +0300
+++ b/src/auth/db-ldap.h	Tue Apr 12 17:05:49 2011 +0300
@@ -5,8 +5,6 @@
    This define enables them until the code here can be refactored */
 #define LDAP_DEPRECATED 1
 
-/* Maximum number of requests in queue. After this new requests are dropped. */
-#define DB_LDAP_MAX_QUEUE_SIZE 1024
 /* Maximum number of pending requests before delaying new requests. */
 #define DB_LDAP_MAX_PENDING_REQUESTS 8
 /* If LDAP connection is down, fail requests after waiting for this long. */


More information about the dovecot-cvs mailing list