summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--build.xml2
-rw-r--r--build/.cvsignore3
-rw-r--r--src/com/memberwebs/ldapxml/LXReader.java13
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
diff --git a/build.xml b/build.xml
index aa6096a..b495ece 100644
--- a/build.xml
+++ b/build.xml
@@ -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)