directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1042848 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/TgsRep.java
Date Mon, 06 Dec 2010 23:21:34 GMT
Author: elecharny
Date: Mon Dec  6 23:21:34 2010
New Revision: 1042848

URL: http://svn.apache.org/viewvc?rev=1042848&view=rev
Log:
Fixed the generated length for TGS-REP messages

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/TgsRep.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/TgsRep.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/TgsRep.java?rev=1042848&r1=1042847&r2=1042848&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/TgsRep.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/TgsRep.java
Mon Dec  6 23:21:34 2010
@@ -48,7 +48,6 @@ public class TgsRep extends KdcRep
     
     // Storage for computed lengths
     private transient int kdcRepLength;
-    private transient int tgsRepLength;
 
     /**
      * Creates a new instance of TGS-REP.
@@ -138,9 +137,8 @@ public class TgsRep extends KdcRep
     public int computeLength()
     {
         kdcRepLength = super.computeLength();
-        tgsRepLength = 1 + TLV.getNbBytes( kdcRepLength ) + kdcRepLength;
         
-        return tgsRepLength;
+        return 1 + TLV.getNbBytes( kdcRepLength ) + kdcRepLength;
     }
     
     
@@ -160,7 +158,7 @@ public class TgsRep extends KdcRep
         
         // The TGS-REP SEQ Tag
         buffer.put( (byte)KerberosConstants.TGS_REP_TAG );
-        buffer.put( TLV.getBytes( tgsRepLength ) );
+        buffer.put( TLV.getBytes( kdcRepLength ) );
         
         // The KDC-REP --------------------------------------------------------
         super.encode( buffer );



Mime
View raw message