From: Timo Sirainen Date: Tue, 12 Apr 2011 14:05:49 +0000 (+0300) Subject: auth: Removed max. request queue limit from LDAP. X-Git-Tag: 2.0.12~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31088625f59b7359d70845d81ea9e3dd8a24eb63;p=thirdparty%2Fdovecot%2Fcore.git 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. --- diff --git a/src/auth/db-ldap.c b/src/auth/db-ldap.c index c3dd77bdf9..cf71809d1a 100644 --- a/src/auth/db-ldap.c +++ b/src/auth/db-ldap.c @@ -414,13 +414,6 @@ db_ldap_check_limits(struct ldap_connection *conn, struct ldap_request *request) 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 @@ struct ldap_connection *db_ldap_init(const char *config_path) 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 --git a/src/auth/db-ldap.h b/src/auth/db-ldap.h index 8e8d68c7d7..8645d78af1 100644 --- a/src/auth/db-ldap.h +++ b/src/auth/db-ldap.h @@ -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. */