Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 99066 invoked from network); 26 Jul 2005 23:38:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2005 23:38:37 -0000 Received: (qmail 95373 invoked by uid 500); 26 Jul 2005 23:38:37 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 95325 invoked by uid 500); 26 Jul 2005 23:38:37 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 95309 invoked by uid 99); 26 Jul 2005 23:38:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2005 16:38:37 -0700 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 26 Jul 2005 16:38:30 -0700 Received: (qmail 99041 invoked by uid 65534); 26 Jul 2005 23:38:36 -0000 Message-ID: <20050726233836.99038.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r225419 - in /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo: AbandonRequest.java LdapMessage.java Date: Tue, 26 Jul 2005 23:38:35 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: elecharny Date: Tue Jul 26 16:38:31 2005 New Revision: 225419 URL: http://svn.apache.org/viewcvs?rev=225419&view=rev Log: After a deeper analyze, the error was really an error. So recommit the fix, but calling Value.getNbBytes instead of Length.getNbBytes to compute the number of bytes necessary to store an integer as a Value element. Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java?rev=225419&r1=225418&r2=225419&view=diff ============================================================================== --- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java (original) +++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java Tue Jul 26 16:38:31 2005 @@ -16,7 +16,7 @@ */ package org.apache.asn1.ldap.pojo; -import org.apache.asn1.ber.tlv.Length; +import org.apache.asn1.ber.tlv.Value; /** * A AbandonRequest Message. Its syntax is : @@ -76,7 +76,7 @@ */ public int computeLength() { - return 1 + 1 + Length.getNbBytes( messageId ); + return 1 + 1 + Value.getNbBytes( messageId ); } /** Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java?rev=225419&r1=225418&r2=225419&view=diff ============================================================================== --- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java (original) +++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/LdapMessage.java Tue Jul 26 16:38:31 2005 @@ -19,6 +19,7 @@ import org.apache.asn1.Asn1Object; import org.apache.asn1.EncoderException; import org.apache.asn1.ber.tlv.Length; +import org.apache.asn1.ber.tlv.Value; import java.nio.ByteBuffer; @@ -391,7 +392,7 @@ // - the tag (0x02), 1 byte // - the length of the Id length, 1 byte // - the Id length, 1 to 4 bytes - int ldapMessageLength = 1 + 1 + Length.getNbBytes(messageId); + int ldapMessageLength = 1 + 1 + Value.getNbBytes(messageId); // Get the protocolOp length int protocolOpLength = protocolOp.computeLength();