This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new bf92326 PROTON-2514: Rewind some pn_data that is read in the
disposition frame
bf92326 is described below
commit bf923263c6b7ebf32b0d00796822cb7e282f12cd
Author: Andrew Stitcher <[email protected]>
AuthorDate: Fri Mar 4 17:18:10 2022 -0500
PROTON-2514: Rewind some pn_data that is read in the disposition frame
---
c/src/core/transport.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/c/src/core/transport.c b/c/src/core/transport.c
index fc5d6ab..e669a06 100644
--- a/c/src/core/transport.c
+++ b/c/src/core/transport.c
@@ -1595,7 +1595,10 @@ static int pni_do_delivery_disposition(pn_transport_t *
transport, pn_delivery_t
case PN_REJECTED: {
pn_bytes_t cond;
pn_bytes_t desc;
- pn_amqp_decode_DqEDqEsSCee(disp_data, &cond, &desc,
pn_condition_info(&remote->condition));
+ pn_data_t *info = pn_condition_info(&remote->condition);
+ pn_data_clear(info);
+ pn_amqp_decode_DqEDqEsSCee(disp_data, &cond, &desc, info);
+ pn_data_rewind(info);
pn_condition_set(&remote->condition, cond, desc);
break;
@@ -1608,7 +1611,9 @@ static int pni_do_delivery_disposition(pn_transport_t *
transport, pn_delivery_t
bool failed;
bool qundeliverable;
bool undeliverable;
+ pn_data_clear(remote->annotations);
pn_amqp_decode_DqEQoQoCe(disp_data, &qfailed, &failed,
&qundeliverable, &undeliverable, remote->annotations);
+ pn_data_rewind(remote->annotations);
if (qfailed) {
remote->failed = failed;
@@ -1619,7 +1624,9 @@ static int pni_do_delivery_disposition(pn_transport_t *
transport, pn_delivery_t
break;
}
default:
+ pn_data_clear(remote->data);
pn_amqp_decode_DqC(disp_data, remote->data);
+ pn_data_rewind(remote->data);
break;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]