Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.29
-
None
-
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)));