You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2020/10/06 20:00:04 UTC

[qpid-dispatch] branch dev-protocol-adaptors updated: DISPATCH-1778: Extra data included in adaptor outbound streams

This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch dev-protocol-adaptors
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/dev-protocol-adaptors by this push:
     new 2a410c8  DISPATCH-1778: Extra data included in adaptor outbound streams
2a410c8 is described below

commit 2a410c8525af4f4377c2fea11adaf1ff5a8b56db
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Mon Oct 5 13:22:16 2020 -0400

    DISPATCH-1778: Extra data included in adaptor outbound streams
    
    Body_data processing failed to contain output to the current section.
    This patch prevents qd_message_body_data_buffers from sending too
    much data if new sections are added before the current section is
    disposed.
---
 src/message.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/message.c b/src/message.c
index c5d8725..21c226b 100644
--- a/src/message.c
+++ b/src/message.c
@@ -2450,6 +2450,12 @@ int qd_message_body_data_buffers(qd_message_body_data_t *body_data, pn_raw_buffe
         buffers[idx].size     = qd_buffer_size(buffer) - (buffer == body_data->payload.buffer ? body_data->payload.offset : 0);
         buffers[idx].offset   = 0;
 
+        if (buffer == body_data->last_buffer) {
+            // Don't process beyond the end of this body_data section
+            actual_count++;
+            break;
+        }
+
         buffer = DEQ_NEXT(buffer);
         actual_count++;
         idx++;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org