Issue Details (XML | Word | Printable)

Key: DIRMINA-45
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Trustin Lee
Reporter: Alex
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

DemuxingProtocolCodecFactory.doDecode is called even after the buffer is empty.

Created: 20/May/05 09:40 PM   Updated: 30/May/05 11:45 PM
Return to search
Component/s: None
Affects Version/s: 0.7.1
Fix Version/s: 0.7.2

Time Tracking:
Not Specified

Environment: JDK1.4.2

Resolution Date: 23/May/05 03:02 PM


 Description  « Hide
I am not sure if it is a bug or I just misunderstood something.

I am implementing a protocol and use Demuxing* classes.
When I return MessageDecoder.OK from my MessageDecoder's decode method, MINA tries repeatedly calls this method again. If I return MessageDecoder.NEED_DATA everything goes fine.
So, I would expect completely reversal behaviour.

I checked CumulativeProtocolDecoder and DemuxingProtocolCodecFactory classes.
In CumulativeProtocolDecoder.decode it says that doDecode is invoked repeatedly until it returns false. Fine. But what "false" means here? I would guess that it means that buffer was completely decoded and no more data is needed. But DemuxingProtocolCodedFactory.doDecode returns true if decoder returned MessageDecoder.OK and false if decoder returned MessageDecoder.NEED_DATA. Isn't wrong here?

Alex

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.