Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-45

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.1
    • 0.7.2
    • None
    • None
    • JDK1.4.2

    Description

      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

      Attachments

        Activity

          People

            trustin Trustin Lee
            inout Alex
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: