summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-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)