You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/07/12 10:16:43 UTC
svn commit: r963209 -
/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControl.java
Author: kayyagari
Date: Mon Jul 12 08:16:42 2010
New Revision: 963209
URL: http://svn.apache.org/viewvc?rev=963209&view=rev
Log:
o fixed the wrongly encoded length values
Modified:
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControl.java
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControl.java?rev=963209&r1=963208&r2=963209&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControl.java Mon Jul 12 08:16:42 2010
@@ -99,20 +99,20 @@ public class PasswordPolicyResponseContr
if ( timeBeforeExpiration >= 0 )
{
buffer.put( ( byte ) PasswordPolicyResponseControlTags.TIME_BEFORE_EXPIRATION_TAG.getValue() );
- buffer.put( TLV.getBytes( timeBeforeExpiration ) );
+ buffer.put( TLV.getBytes( TLV.getNbBytes( timeBeforeExpiration ) ) );
buffer.put( Value.getBytes( timeBeforeExpiration ) );
}
else if ( graceAuthNsRemaining >= 0 )
{
buffer.put( ( byte ) PasswordPolicyResponseControlTags.GRACE_AUTHNS_REMAINING_TAG.getValue() );
- buffer.put( TLV.getBytes( graceAuthNsRemaining ) );
+ buffer.put( TLV.getBytes( TLV.getNbBytes( graceAuthNsRemaining ) ) );
buffer.put( Value.getBytes( graceAuthNsRemaining ) );
}
if ( ppolicyError != null )
{
buffer.put( UniversalTag.ENUMERATED_TAG );
- buffer.put( TLV.getBytes( ppolicyError.getValue() ) );
+ buffer.put( TLV.getBytes( TLV.getNbBytes( ppolicyError.getValue() ) ) );
buffer.put( Value.getBytes( ppolicyError.getValue() ) );
}