directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r569768 - /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
Date Sun, 26 Aug 2007 05:40:23 GMT
Author: akarasulu
Date: Sat Aug 25 22:40:22 2007
New Revision: 569768

URL: http://svn.apache.org/viewvc?rev=569768&view=rev
Log:
fix for DIRSERVER-1033

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java?rev=569768&r1=569767&r2=569768&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
Sat Aug 25 22:40:22 2007
@@ -231,15 +231,13 @@
         
         // Now, get the context
         LdapContext ctx = getLdapContext( session, bindRequest, env );
-        ServerLdapContext newCtx = ( ServerLdapContext ) ctx.lookup( "" );
-        
-        // Inject controls into the context
-        setRequestControls( newCtx, bindRequest );
         
         // Test that we successfully got one. If not, an error has already been returned.
         if ( ctx != null )
         {
-            SessionRegistry.getSingleton().setLdapContext( session, ctx );
+            ServerLdapContext newCtx = ( ServerLdapContext ) ctx.lookup( "" );
+            setRequestControls( newCtx, bindRequest );
+            SessionRegistry.getSingleton().setLdapContext( session, newCtx );
             bindResult.setResultCode( ResultCodeEnum.SUCCESS );
             BindResponse response = ( BindResponse ) bindRequest.getResultResponse();
             response.addAll( newCtx.getResponseControls() );



Mime
View raw message