directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r365734 - /directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/psearch/PSearchControl.java
Date Tue, 03 Jan 2006 20:22:32 GMT
Author: elecharny
Date: Tue Jan  3 12:22:28 2006
New Revision: 365734

URL: http://svn.apache.org/viewcvs?rev=365734&view=rev
Log:
clarifying the code

Modified:
    directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/psearch/PSearchControl.java

Modified: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/psearch/PSearchControl.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/psearch/PSearchControl.java?rev=365734&r1=365733&r2=365734&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/psearch/PSearchControl.java
(original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/asn1/pojo/psearch/PSearchControl.java
Tue Jan  3 12:22:28 2006
@@ -37,10 +37,13 @@
      */
     public int computeLength()
     {
-        int changeTypesLength = 2 + Value.getNbBytes( changeTypes );
-        return  1 + Length.getNbBytes( changeTypesLength + 6 ) +
-                changeTypesLength + // for changeTypes 
-                6;                  // for two boolean values 
+        int changeTypesLength = 1 + 1 + Value.getNbBytes( changeTypes );
+        int changesOnlyLength = 1 + 1 + 1;
+        int returRCsLength = 1 + 1 + 1;
+
+        int psearchSeqLength = changeTypesLength + changesOnlyLength + returRCsLength;
+        
+        return  1 + Length.getNbBytes( psearchSeqLength ) + psearchSeqLength;
     }
 
     



Mime
View raw message