qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1411287 - /qpid/proton/trunk/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
Date Mon, 19 Nov 2012 16:37:19 GMT
Author: rgodfrey
Date: Mon Nov 19 16:37:18 2012
New Revision: 1411287

URL: http://svn.apache.org/viewvc?rev=1411287&view=rev
Log:
PROTON-143 : Trace the frame after the onPayloadTooLarge runnable is executed.

Modified:
    qpid/proton/trunk/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java

Modified: qpid/proton/trunk/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java?rev=1411287&r1=1411286&r2=1411287&view=diff
==============================================================================
--- qpid/proton/trunk/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
(original)
+++ qpid/proton/trunk/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
Mon Nov 19 16:37:18 2012
@@ -857,18 +857,8 @@ public class TransportImpl extends Endpo
                            ByteBuffer payload,
                            Runnable onPayloadTooLarge)
     {
-        if( _protocolTracer!=null ) 
-        {
-            ByteBuffer originalPayload = null;
-            if( payload!=null ) 
-            {
-                originalPayload = payload.duplicate();
-            }
-            _protocolTracer.sentFrame(new TransportFrame(channel, (FrameBody) frameBody,
Binary.create(originalPayload)));
-        }
-
         int oldPosition = buffer.position();
-        buffer.position(buffer.position()+8);
+        buffer.position(oldPosition+8);
         _encoder.setByteBuffer(buffer);
 
         if(payload == null || payload.remaining() < _maxFrameSize)
@@ -886,6 +876,16 @@ public class TransportImpl extends Endpo
             _encoder.writeDescribedType(frameBody);
         }
 
+        if( _protocolTracer!=null )
+        {
+            ByteBuffer originalPayload = null;
+            if( payload!=null )
+            {
+                originalPayload = payload.duplicate();
+            }
+            _protocolTracer.sentFrame(new TransportFrame(channel, (FrameBody) frameBody,
Binary.create(originalPayload)));
+        }
+
         int payloadSize = Math.min(payload == null ? 0 : payload.remaining(), _maxFrameSize
- (buffer.position() - oldPosition));
         if(payloadSize > 0)
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message