From bf7b61bf7e22fc0c1c0bf69255f44d0139c86937 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 24 Aug 2006 15:50:33 +0000
Subject: [PATCH] Add a configuration option to limit the number of entries that will be checked for matches during a search operation. A value of -1 or 0 will remove the limit, like the behavior of DS 5 and 6. Changed the "unlimited" values of size and time limits to be consistent with the lookthrough limit (-1 or 0). 

---
 opends/src/server/org/opends/server/core/SearchOperation.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/SearchOperation.java b/opends/src/server/org/opends/server/core/SearchOperation.java
index ebd251e..169a901 100644
--- a/opends/src/server/org/opends/server/core/SearchOperation.java
+++ b/opends/src/server/org/opends/server/core/SearchOperation.java
@@ -797,7 +797,7 @@
 
     // See if the time limit has expired.  If so, then don't send the entry and
     // indicate that the search should end.
-    if (TimeThread.getTime() >= timeLimitExpiration)
+    if ((timeLimit > 0) && (TimeThread.getTime() >= timeLimitExpiration))
     {
       setResultCode(ResultCode.TIME_LIMIT_EXCEEDED);
       appendErrorMessage(getMessage(MSGID_SEARCH_TIME_LIMIT_EXCEEDED,
@@ -1242,7 +1242,7 @@
 
     // See if the time limit has expired.  If so, then don't send the entry and
     // indicate that the search should end.
-    if (TimeThread.getTime() >= timeLimitExpiration)
+    if ((timeLimit > 0) && (TimeThread.getTime() >= timeLimitExpiration))
     {
       setResultCode(ResultCode.TIME_LIMIT_EXCEEDED);
       appendErrorMessage(getMessage(MSGID_SEARCH_TIME_LIMIT_EXCEEDED,

--
Gitblit v1.10.0