PROTON-865: Revert error check in array code. Removed an error check in proton array encoder to ensure elements in an array have the right type. This check was added to aid debugging but causes several test failures.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/377fd550 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/377fd550 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/377fd550 Branch: refs/heads/cjansen-cpp-client Commit: 377fd55032a0e99664e774999e858bf804d4b6e4 Parents: 9d5bf7d Author: Alan Conway <acon...@redhat.com> Authored: Thu Jul 9 15:50:38 2015 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Thu Jul 9 15:50:38 2015 -0400 ---------------------------------------------------------------------- proton-c/src/codec/encoder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/377fd550/proton-c/src/codec/encoder.c ---------------------------------------------------------------------- diff --git a/proton-c/src/codec/encoder.c b/proton-c/src/codec/encoder.c index b6651fc..082bb21 100644 --- a/proton-c/src/codec/encoder.c +++ b/proton-c/src/codec/encoder.c @@ -250,17 +250,17 @@ static int pni_encoder_enter(void *ctx, pn_data_t *data, pni_node_t *node) pn_encoder_t *encoder = (pn_encoder_t *) ctx; pni_node_t *parent = pn_data_node(data, node->parent); pn_atom_t *atom = &node->atom; - uint8_t code = pn_node2code(encoder, node); + uint8_t code; conv_t c; /** In an array we don't write the code before each element, only the first. */ if (pn_is_in_array(data, parent, node)) { - uint8_t array_code = pn_type2code(encoder, parent->type); - if (code != array_code) - return pn_error_format(data->error, PN_ERR, "array element type mismatch"); - if (pn_is_first_in_array(data, parent, node)) + code = pn_type2code(encoder, parent->type); + if (pn_is_first_in_array(data, parent, node)) { pn_encoder_writef8(encoder, code); + } } else { + code = pn_node2code(encoder, node); pn_encoder_writef8(encoder, code); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org