You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2020/07/02 12:52:41 UTC

[qpid-proton] branch array-of-lists-first-list-empty updated: PROTON-2244: Correction on previous fix, prevent zero-length array encoding for all array memebers of an array

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

kpvdr pushed a commit to branch array-of-lists-first-list-empty
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/array-of-lists-first-list-empty by this push:
     new a675dee  PROTON-2244: Correction on previous fix, prevent zero-length array encoding for all array memebers of an array
a675dee is described below

commit a675dee3c439c92777a293164c7c273230c595a9
Author: Kim van der Riet <kp...@apache.org>
AuthorDate: Thu Jul 2 08:52:17 2020 -0400

    PROTON-2244: Correction on previous fix, prevent zero-length array encoding for all array memebers of an array
---
 c/src/core/encoder.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/c/src/core/encoder.c b/c/src/core/encoder.c
index f38c24d..983d3d4 100644
--- a/c/src/core/encoder.c
+++ b/c/src/core/encoder.c
@@ -338,8 +338,7 @@ static int pni_encoder_exit(void *ctx, pn_data_t *data, pni_node_t *node)
 
   // Special case 0 length list, but not as first element in an array
   pni_node_t *parent = pn_data_node(data, node->parent);
-  if (node->atom.type==PN_LIST && node->children-encoder->null_count==0 &&
-      !(pn_is_in_array(data, parent, node) && pn_is_first_in_array(data, parent, node))) {
+  if (node->atom.type==PN_LIST && node->children-encoder->null_count==0 && !pn_is_in_array(data, parent, node)) {
     encoder->position = node->start-1; // position of list opcode
     pn_encoder_writef8(encoder, PNE_LIST0);
     encoder->null_count = 0;


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