]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Removed max. request queue limit from LDAP.
authorTimo Sirainen <tss@iki.fi>
Tue, 12 Apr 2011 14:05:49 +0000 (17:05 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 12 Apr 2011 14:05:49 +0000 (17:05 +0300)
Old requests get dropped after 60 seconds, but other than that there is
probably not much point in having a hard coded limit.

src/auth/db-ldap.c
src/auth/db-ldap.h

index c3dd77bdf98affafa6ed7bacc7647bb5b1ac5099..cf71809d1a1ee2dfeea3308fed4a58292ced0c5c 100644 (file)
@@ -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;
index 8e8d68c7d74efb6d984f419bf5108fb6e35aaba9..8645d78af1a083a198db09ffa1bd246f7310d1a8 100644 (file)
@@ -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. */