summaryrefslogtreecommitdiff
path: root/src/com/memberwebs
diff options
context:
space:
mode:
authorStef <stef@ws.local>2004-06-08 19:24:58 +0000
committerStef <stef@ws.local>2004-06-08 19:24:58 +0000
commit719790c0a8351ce519827419dbf7e1a2a774fae4 (patch)
treef9eaa854bcb5700a070d269b133476633af8a94f /src/com/memberwebs
parentf2b3b94f01314b0721906c494e6ae793fe500e21 (diff)
Fixed bug where too many entries were read for a depth of 1 and 0
Diffstat (limited to 'src/com/memberwebs')
-rw-r--r--src/com/memberwebs/ldapxml/LXReader.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/memberwebs/ldapxml/LXReader.java b/src/com/memberwebs/ldapxml/LXReader.java
index 420925a..50fa0a2 100644
--- a/src/com/memberwebs/ldapxml/LXReader.java
+++ b/src/com/memberwebs/ldapxml/LXReader.java
@@ -207,8 +207,19 @@ public class LXReader
if(sort == null)
cons.setMaxResults(last + 1);
+ int scope = LDAPConnection.SCOPE_SUB;
+ switch(specs.getDepth())
+ {
+ case 0:
+ scope = LDAPConnection.SCOPE_BASE;
+ break;
+ case 1:
+ scope = LDAPConnection.SCOPE_ONE;
+ break;
+ }
+
// Search tree for entries
- LDAPSearchResults results = m_connection.search(base, LDAPConnection.SCOPE_SUB,
+ LDAPSearchResults results = m_connection.search(base, scope,
specs.getFilter(filter), attrs, false, cons);
if(sort != null)