qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1343854 - /qpid/proton/trunk/proton-j/src/org/apache/qpid/proton/engine/impl/FrameParser.java
Date Tue, 29 May 2012 17:08:24 GMT
Author: rgodfrey
Date: Tue May 29 17:08:24 2012
New Revision: 1343854

URL: http://svn.apache.org/viewvc?rev=1343854&view=rev
Log:
Proton-j: Fix input return value

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

Modified: qpid/proton/trunk/proton-j/src/org/apache/qpid/proton/engine/impl/FrameParser.java
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-j/src/org/apache/qpid/proton/engine/impl/FrameParser.java?rev=1343854&r1=1343853&r2=1343854&view=diff
==============================================================================
--- qpid/proton/trunk/proton-j/src/org/apache/qpid/proton/engine/impl/FrameParser.java (original)
+++ qpid/proton/trunk/proton-j/src/org/apache/qpid/proton/engine/impl/FrameParser.java Tue
May 29 17:08:24 2012
@@ -91,6 +91,8 @@ class FrameParser
         int size = _size;
         State state = _state;
         ByteBuffer oldIn = null;
+
+        // TODO protocol header hack
         if(_ignore != 0)
         {
             if(unconsumed > _ignore)
@@ -102,8 +104,8 @@ class FrameParser
             }
             else
             {
-                _ignore-=unconsumed;
-                return length-unconsumed;
+                _ignore-=length;
+                return length;
             }
         }
 
@@ -285,7 +287,7 @@ class FrameParser
 
         _localError = frameParsingError;
 
-        return _state == State.ERROR ? -1 : length - unconsumed;
+        return _state == State.ERROR ? -1 : length - in.remaining();
     }
 
     private void reset()



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


Mime
View raw message