directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r433698 - /directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
Date Tue, 22 Aug 2006 17:13:08 GMT
Author: akarasulu
Date: Tue Aug 22 10:13:08 2006
New Revision: 433698

URL: http://svn.apache.org/viewvc?rev=433698&view=rev
Log:
detecting exceptions from deep inside codec and writing them out as proper responses with
errors

Modified:
    directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java

Modified: directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java?rev=433698&r1=433697&r2=433698&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
(original)
+++ directory/branches/apacheds/1.0/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
Tue Aug 22 10:13:08 2006
@@ -65,6 +65,7 @@
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
 import org.apache.directory.shared.ldap.message.PersistentSearchControl;
 import org.apache.directory.shared.ldap.message.Request;
+import org.apache.directory.shared.ldap.message.ResponseCarryingMessageException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.ResultResponse;
 import org.apache.directory.shared.ldap.message.ResultResponseRequest;
@@ -402,6 +403,13 @@
 
         public void exceptionCaught( IoSession session, Throwable cause )
         {
+            if ( cause instanceof ResponseCarryingMessageException )
+            {
+                ResponseCarryingMessageException rcme = ( ResponseCarryingMessageException
) cause;
+                session.write( rcme.getResponse() );
+                return;
+            }
+            
             SessionLog.warn( session,
                 "Unexpected exception forcing session to close: sending disconnect notice
to client.", cause );
             session.write( NoticeOfDisconnect.PROTOCOLERROR );



Mime
View raw message