directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r963209 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControl.java
Date Mon, 12 Jul 2010 08:16:43 GMT
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() ) );
         }
 



Mime
View raw message