Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 39584 invoked from network); 30 May 2006 18:38:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 May 2006 18:38:43 -0000 Received: (qmail 67041 invoked by uid 500); 30 May 2006 18:38:43 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 66850 invoked by uid 500); 30 May 2006 18:38:42 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 66830 invoked by uid 99); 30 May 2006 18:38:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 11:38:42 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 11:38:41 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CF87D7141ED for ; Tue, 30 May 2006 18:37:51 +0000 (GMT) Message-ID: <6474283.1149014271847.JavaMail.jira@brutus> Date: Tue, 30 May 2006 18:37:51 +0000 (GMT+00:00) From: "Hiram Chirino (JIRA)" To: activemq-dev@geronimo.apache.org Subject: [jira] Resolved: (AMQ-718) Incorrect length specification in loose encoding? In-Reply-To: <27141948.1148278011495.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ https://issues.apache.org/activemq/browse/AMQ-718?page=all ] Hiram Chirino resolved AMQ-718: ------------------------------- Fix Version: 4.0 (was: 4.1) Resolution: Fixed recut 4.0 > Incorrect length specification in loose encoding? > ------------------------------------------------- > > Key: AMQ-718 > URL: https://issues.apache.org/activemq/browse/AMQ-718 > Project: ActiveMQ > Type: Bug > Components: Transport > Versions: 4.0, 4.0 RC2, 4.0 RC3 > Reporter: Andrew Lusk > Assignee: Hiram Chirino > Fix For: 4.0 > > > Unless loose-encoded length is mean to mean something different from tight-encoded length, I believe that the length written to the wire for loosely-encoded OpenWire messages is off by 4. I imagine this hasn't been caught before because most clients synchronously read packets off the wire and so can ignore the length specification. > --- activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java (revision 399408) > +++ activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java (working copy) > @@ -172,7 +172,7 @@ > sequence = baos.toByteSequence(); > > if( !sizePrefixDisabled ) { > - size = sequence.getLength()-4; > + size = sequence.getLength(); > ByteArrayPacket packet = new ByteArrayPacket(sequence); > PacketData.writeIntBig(packet, size); > } > @@ -253,7 +253,7 @@ > if( !sizePrefixDisabled ) { > looseOut.close(); > ByteSequence sequence = baos.toByteSequence(); > - dataOut.writeInt(sequence.getLength()-4); > + dataOut.writeInt(sequence.getLength()); > dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength()); > } > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira