diff options
author | Stef <stef@ws.local> | 2004-06-08 19:24:58 +0000 |
---|---|---|
committer | Stef <stef@ws.local> | 2004-06-08 19:24:58 +0000 |
commit | 719790c0a8351ce519827419dbf7e1a2a774fae4 (patch) | |
tree | f9eaa854bcb5700a070d269b133476633af8a94f | |
parent | f2b3b94f01314b0721906c494e6ae793fe500e21 (diff) |
Fixed bug where too many entries were read for a depth of 1 and 0
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | build.xml | 2 | ||||
-rw-r--r-- | build/.cvsignore | 3 | ||||
-rw-r--r-- | src/com/memberwebs/ldapxml/LXReader.java | 13 |
4 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..487cdb6 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,7 @@ +0.9.1 + - Fixed bug where LXReader would try to read an entire subtree + when only scope 'base' or 'onelevel' was required. + +0.9 + - Initial public release + - Documented properly and isolated dependencies @@ -2,7 +2,7 @@ <project name="ldapxml" default="build" basedir="."> <target name="init"> - <property name="version" value="0.9"/> + <property name="version" value="0.9.1"/> </target> <target name="build"> diff --git a/build/.cvsignore b/build/.cvsignore new file mode 100644 index 0000000..5481bd5 --- /dev/null +++ b/build/.cvsignore @@ -0,0 +1,3 @@ +ldapxml-* +manifest +com 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) |