Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-5896

[C++ client] Out of Bounds received when message is bigger than remaining TCP frame size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.29
    • None
    • C++ Client
    • None

    Description

      When implementing QPID-5895: if a message is split between two (or more) TCP/IP frames, ConnectionContext::get method raises:

      Out of Bounds: requested advance of 1000 at 44 but only 434 available

      That is due to the fact that the code calls:

      current = pn_link_current(..) // that returns just incomplete part of the message from already-read-TCP-frame
      new EncodedMessage(pn_delivery_pending(current)) //here we create EncodedMessage with incomplete length
      

      There needs to be a loop like:

      current = pn_link_current(..)
      while pn_delivery_partial(current) {
          buffer_current_somewhere;
          current = pn_link_current(..);
          if (!current)
              wait_for_session_to_get_new_frame
      }
      encoded(new EncodedMessage(pn_delivery_pending(all_current_deliveries)));
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pmoravec Pavel Moravec
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: