This is an automated email from the ASF dual-hosted git repository. tross pushed a commit to branch dev-protocol-adaptors in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
commit ac5aa774bb19282831e5e1840270d9c46676fe95 Author: Ted Ross <tr...@apache.org> AuthorDate: Wed Jun 3 18:14:40 2020 -0400 Dataplane: Changed the new compose function to have only one field for headers. This field can have both properties and application properties. It's more efficient put together like this. --- include/qpid/dispatch/message.h | 3 +-- src/adaptors/reference_adaptor.c | 2 +- src/message.c | 14 +++++--------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/include/qpid/dispatch/message.h b/include/qpid/dispatch/message.h index 55c3dba..030fc0c 100644 --- a/include/qpid/dispatch/message.h +++ b/include/qpid/dispatch/message.h @@ -279,8 +279,7 @@ void qd_message_compose_3(qd_message_t *msg, qd_composed_field_t *content1, qd_c void qd_message_compose_4(qd_message_t *msg, qd_composed_field_t *content1, qd_composed_field_t *content2, qd_composed_field_t *content3); void qd_message_compose_5(qd_message_t *msg, - qd_composed_field_t *properties, - qd_composed_field_t *application_properties, + qd_composed_field_t *headers, qd_buffer_list_t *body, bool complete); diff --git a/src/adaptors/reference_adaptor.c b/src/adaptors/reference_adaptor.c index b6ea5b4..95801f2 100644 --- a/src/adaptors/reference_adaptor.c +++ b/src/adaptors/reference_adaptor.c @@ -146,7 +146,7 @@ static void qdr_ref_flow(void *context, qdr_link_t *link, int credit) qd_buffer_insert(buf, 13); DEQ_INSERT_HEAD(buffers, buf); - qd_message_compose_5(msg, props, 0, &buffers, true); + qd_message_compose_5(msg, props, &buffers, true); qd_compose_free(props); qdr_delivery_t *dlv = qdr_link_deliver(adaptor->out_link, msg, 0, false, 0, 0); diff --git a/src/message.c b/src/message.c index 81ba863..06399cf 100644 --- a/src/message.c +++ b/src/message.c @@ -2180,20 +2180,16 @@ void qd_message_compose_4(qd_message_t *msg, qd_composed_field_t *field1, qd_com void qd_message_compose_5(qd_message_t *msg, - qd_composed_field_t *properties, - qd_composed_field_t *application_properties, + qd_composed_field_t *headers, qd_buffer_list_t *body, bool complete) { - qd_message_content_t *content = MSG_CONTENT(msg); - qd_buffer_list_t *properties_buffers = properties ? qd_compose_buffers(properties) : 0; - qd_buffer_list_t *application_properties_buffers = application_properties ? qd_compose_buffers(application_properties) : 0; + qd_message_content_t *content = MSG_CONTENT(msg); + qd_buffer_list_t *headers_buffers = headers ? qd_compose_buffers(headers) : 0; DEQ_INIT(content->buffers); - if (properties_buffers) - DEQ_APPEND(content->buffers, (*properties_buffers)); - if (application_properties_buffers) - DEQ_APPEND(content->buffers, (*application_properties_buffers)); + if (headers_buffers) + DEQ_APPEND(content->buffers, (*headers_buffers)); if (body) { qd_composed_field_t *field = qd_compose(QD_PERFORMATIVE_BODY_DATA, 0); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org