You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Pavel Moravec (JIRA)" <ji...@apache.org> on 2014/07/16 09:28:05 UTC
[jira] [Created] (QPID-5896) [C++ client] Out of Bounds received
when message is bigger than remaining TCP frame size
Pavel Moravec created QPID-5896:
-----------------------------------
Summary: [C++ client] Out of Bounds received when message is bigger than remaining TCP frame size
Key: QPID-5896
URL: https://issues.apache.org/jira/browse/QPID-5896
Project: Qpid
Issue Type: Bug
Components: C++ Client
Affects Versions: 0.29
Reporter: Pavel Moravec
Priority: Minor
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:
{noformat}
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
{noformat}
There needs to be a loop like:
{noformat}
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)));
{noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org