Repository: qpid-dispatch Updated Branches: refs/heads/master 41fc94588 -> fb5fe90ca
DISPATCH-796 - Added header to the management agent response for Python and C management agents Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/fb5fe90c Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/fb5fe90c Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/fb5fe90c Branch: refs/heads/master Commit: fb5fe90ca211a5dd1c9e9b6414344fc908909e88 Parents: 41fc945 Author: Ganesh Murthy <gmur...@redhat.com> Authored: Wed Jul 5 11:01:56 2017 -0400 Committer: Ganesh Murthy <gmur...@redhat.com> Committed: Wed Jul 5 11:01:56 2017 -0400 ---------------------------------------------------------------------- src/python_embedded.c | 9 +++++++++ src/router_core/management_agent.c | 20 ++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fb5fe90c/src/python_embedded.c ---------------------------------------------------------------------- diff --git a/src/python_embedded.c b/src/python_embedded.c index 27374c2..563fd00 100644 --- a/src/python_embedded.c +++ b/src/python_embedded.c @@ -562,6 +562,15 @@ static void IoAdapter_dealloc(IoAdapter* self) static qd_error_t compose_python_message(qd_composed_field_t **field, PyObject *message, qd_dispatch_t* qd) { + + // Add header first + *field = qd_compose(QD_PERFORMATIVE_HEADER, *field); + + qd_compose_start_list(*field); + qd_compose_insert_bool(*field, 0); // durable + qd_compose_end_list(*field); + + *field = qd_compose(QD_PERFORMATIVE_PROPERTIES, *field); qd_compose_start_list(*field); qd_compose_insert_null(*field); // message-id http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fb5fe90c/src/router_core/management_agent.c ---------------------------------------------------------------------- diff --git a/src/router_core/management_agent.c b/src/router_core/management_agent.c index aa58dbf..9b11925 100644 --- a/src/router_core/management_agent.c +++ b/src/router_core/management_agent.c @@ -134,13 +134,25 @@ static void qd_set_properties(qd_message_t *msg, qd_iterator_t **reply_to, qd_composed_field_t **fld) { - qd_iterator_t *correlation_id = qd_message_field_iterator_typed(msg, QD_FIELD_CORRELATION_ID); - // Grab the reply_to field from the incoming message. This is the address we will send the response to. - *reply_to = qd_message_field_iterator(msg, QD_FIELD_REPLY_TO); - *fld = qd_compose(QD_PERFORMATIVE_PROPERTIES, 0); + // + // Start header + // + *fld = qd_compose(QD_PERFORMATIVE_HEADER, 0); + + qd_compose_start_list(*fld); + qd_compose_insert_bool(*fld, 0); // durable + qd_compose_end_list(*fld); + + // + // End header, start properties + // + *fld = qd_compose(QD_PERFORMATIVE_PROPERTIES, *fld); qd_compose_start_list(*fld); qd_compose_insert_null(*fld); // message-id qd_compose_insert_null(*fld); // user-id + qd_iterator_t *correlation_id = qd_message_field_iterator_typed(msg, QD_FIELD_CORRELATION_ID); + // Grab the reply_to field from the incoming message. This is the address we will send the response to. + *reply_to = qd_message_field_iterator(msg, QD_FIELD_REPLY_TO); qd_compose_insert_string_iterator(*fld, *reply_to); // to qd_compose_insert_null(*fld); // subject qd_compose_insert_null(*fld); // reply-to --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org