qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r682915 - in /incubator/qpid/trunk/qpid/java: client/src/main/java/org/apache/qpid/nclient/impl/ common/src/main/java/org/apache/qpid/transport/codec/ common/src/main/java/org/apache/qpid/transport/network/
Date Tue, 05 Aug 2008 20:04:55 GMT
Author: rhs
Date: Tue Aug  5 13:04:55 2008
New Revision: 682915

URL: http://svn.apache.org/viewvc?rev=682915&view=rev
Log:
QPID-1219: cleanup of prior commit (r682887)

Removed:
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Validator.java
Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/impl/ClientSession.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Disassembler.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/impl/ClientSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/impl/ClientSession.java?rev=682915&r1=682914&r2=682915&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/impl/ClientSession.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/impl/ClientSession.java
Tue Aug  5 13:04:55 2008
@@ -90,25 +90,12 @@
     {
         DeliveryProperties dp = msg.getDeliveryProperties();
         MessageProperties mp = msg.getMessageProperties();
-        Header header;
-        if (msg.getHeader() == null || dp.isDirty() || mp.isDirty())
-        {
-            header = new Header(dp, mp);
-            msg.setHeader(header);
-            dp.setDirty(false);
-            mp.setDirty(false);
-        }
-        else
-        {
-            header = msg.getHeader();
-        }
-        // The javadoc clearly says that this method is suitable for small messages
-        // therefore reading the content in one shot.
         ByteBuffer  body = msg.readData();
         int size = body.remaining();
         super.messageTransfer
             (destination, MessageAcceptMode.get(acceptMode),
-             MessageAcquireMode.get(acquireMode), header, body);
+             MessageAcquireMode.get(acquireMode),
+             new Header(dp, mp), body);
         _currentDataSizeNotSynced += size;
         _currentDataSizeNotFlushed += size;
     }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Disassembler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Disassembler.java?rev=682915&r1=682914&r2=682915&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Disassembler.java
(original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Disassembler.java
Tue Aug  5 13:04:55 2008
@@ -119,12 +119,13 @@
     }
 
     private void fragment(byte flags, SegmentType type, ProtocolEvent event,
-                          ByteBuffer buf, boolean first, boolean last)
+                          ByteBuffer buf)
     {
         byte typeb = (byte) type.getValue();
         byte track = event.getEncodedTrack() == Frame.L4 ? (byte) 1 : (byte) 0;
 
         int remaining = buf.remaining();
+        boolean first = true;
         while (true)
         {
             int size = min(maxPayload, remaining);
@@ -136,7 +137,7 @@
                 newflags |= FIRST_FRAME;
                 first = false;
             }
-            if (last && remaining == 0)
+            if (remaining == 0)
             {
                 newflags |= LAST_FRAME;
             }
@@ -219,11 +220,11 @@
 
         synchronized (sendlock)
         {
-            fragment(flags, type, method, methodSeg, true, true);
+            fragment(flags, type, method, methodSeg);
             if (payload)
             {
-                fragment((byte) 0x0, SegmentType.HEADER, method, headerSeg, true, true);
-                fragment(LAST_SEG, SegmentType.BODY, method, method.getBody(), true, true);
+                fragment((byte) 0x0, SegmentType.HEADER, method, headerSeg);
+                fragment(LAST_SEG, SegmentType.BODY, method, method.getBody());
             }
         }
     }



Mime
View raw message