directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r549365 - /directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorDecoder.java
Date Thu, 21 Jun 2007 04:51:27 GMT
Author: erodriguez
Date: Wed Jun 20 21:51:26 2007
New Revision: 549365

URL: http://svn.apache.org/viewvc?view=rev&rev=549365
Log:
Corrected "double-decode" problem in new Change Password error decoder, used by client-side.

Modified:
    directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorDecoder.java

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorDecoder.java?view=diff&rev=549365&r1=549364&r2=549365
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/io/ChangePasswordErrorDecoder.java
Wed Jun 20 21:51:26 2007
@@ -54,19 +54,18 @@
 
         modifier.setProtocolVersionNumber( buf.getShort() );
 
-        /*
-         * TODO - No condition to set on modifier.
-         */
-        buf.getShort();
+        // AP_REQ length will be 0 for error messages
+        modifier.setAuthHeaderLength( buf.getShort() );
 
         int errorLength = messageLength - HEADER_LENGTH;
 
         byte[] errorBytes = new byte[errorLength];
 
         buf.get( errorBytes );
+        ByteBuffer errorBuffer = ByteBuffer.wrap( errorBytes );
 
         ErrorMessageDecoder errorDecoder = new ErrorMessageDecoder();
-        ErrorMessage errorMessage = errorDecoder.decode( buf );
+        ErrorMessage errorMessage = errorDecoder.decode( errorBuffer );
 
         modifier.setErrorMessage( errorMessage );
 



Mime
View raw message