directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r106725 - /incubator/directory/eve/trunk/jndi-provider /incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java
Date Sat, 27 Nov 2004 15:34:11 GMT
Author: akarasulu
Date: Sat Nov 27 07:34:10 2004
New Revision: 106725

URL: http://svn.apache.org/viewcvs?view=rev&rev=106725
Log:
Changes ...

 o fixed bug http://nagoya.apache.org/jira/browse/DIREVE-88
 o ignoring eve working director in jndi-provider


Modified:
   incubator/directory/eve/trunk/jndi-provider/   (props changed)
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java

Modified: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java?view=diff&rev=106725&p1=incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java&r1=106724&p2=incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java&r2=106725
==============================================================================
--- incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java
(original)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/SearchHandler.java
Sat Nov 27 07:34:10 2004
@@ -89,6 +89,19 @@
             ctx = ( LdapContext ) ictx.lookup( "" );
             ctx.addToEnvironment( DEREFALIASES_KEY, req.getDerefAliases().getName() );
             list = ctx.search( req.getBase(), req.getFilter().toString(), controls );
+            if ( list.hasMore() )
+            {
+                return new SearchResponseIterator( req, list );
+            }
+            else
+            {
+                list.close();
+                SearchResponseDone resp = new SearchResponseDoneImpl( req.getMessageId()
);
+                resp.setLdapResult( new LdapResultImpl( resp ) );
+                resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
+                resp.getLdapResult().setMatchedDn( req.getBase() );
+                return Collections.singleton( resp ).iterator();        
+            }
         }
         catch ( NamingException e )
         {
@@ -111,7 +124,7 @@
             return Collections.singleton( resp ).iterator();
         }
 
-        return new SearchResponseIterator( req, list );
+
     }
 
 

Mime
View raw message