changeset 12940:56616bad7310

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.
author Timo Sirainen <tss@iki.fi>
date Tue, 12 Apr 2011 17:05:49 +0300
parents 475e6633b1d7
children bbcef91eac7e
files src/auth/db-ldap.c src/auth/db-ldap.h
diffstat 2 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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. */