directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r688598 - /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Date Mon, 25 Aug 2008 01:56:20 GMT
Author: akarasulu
Date: Sun Aug 24 18:56:20 2008
New Revision: 688598

URL: http://svn.apache.org/viewvc?rev=688598&view=rev
Log:
a little more logging and fixing bug with size limits

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=688598&r1=688597&r2=688598&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Sun Aug 24 18:56:20 2008
@@ -274,12 +274,21 @@
     
     private int getSearchSizeLimits( SearchRequest req, LdapSession session )
     {
+        LOG.debug( "req size limit = {}, configured size limit = {}", req.getSizeLimit(),

+            ldapServer.getMaxSizeLimit() );
+        
         // Don't bother setting size limits for administrators that don't ask for it
         if ( session.getCoreSession().isAnAdministrator() && req.getSizeLimit() ==
NO_SIZE_LIMIT )
         {
             return NO_SIZE_LIMIT;
         }
         
+        // Don't bother setting size limits for administrators that don't ask for it
+        if ( session.getCoreSession().isAnAdministrator() )
+        {
+            return req.getSizeLimit();
+        }
+        
         /*
          * Non administrator based searches are limited by size if the server 
          * has been configured with unlimited size and the request specifies 
@@ -351,6 +360,7 @@
             req.addAbandonListener( new SearchAbandonListener( ldapServer, cursor ) );
             setTimeLimitsOnCursor( req, session, cursor );
             final int sizeLimit = getSearchSizeLimits( req, session );
+            LOG.debug( "using {} for size limit", sizeLimit );
             
             // Position the cursor at the beginning
             cursor.beforeFirst();



Mime
View raw message