From b5c0eab2fb865be145c8841a939cc4c741289e27 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Mon, 22 Jun 2020 17:32:52 +0200 Subject: [PATCH] Fix malformed GAPs by sending an empty bitset The DDSI spec version 2.3 allows empty bit sets, so malformed GAPs caused by a bug in the code for avoiding those is most easily fixed by generating a GAP with an empty bit set. Signed-off-by: Erik Boasson --- src/core/ddsi/src/q_receive.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/core/ddsi/src/q_receive.c b/src/core/ddsi/src/q_receive.c index 453b353..911f384 100644 --- a/src/core/ddsi/src/q_receive.c +++ b/src/core/ddsi/src/q_receive.c @@ -647,14 +647,6 @@ struct nn_xmsg * nn_gap_info_create_gap(struct writer *wr, struct proxy_reader * if (gi->gapstart <= 0) return NULL; - if (gi->gapnumbits == 0) - { - /* Avoid sending an invalid bitset */ - gi->gapnumbits = 1; - nn_bitset_set (gi->gapnumbits, gi->gapbits, 0); - gi->gapend--; - } - m = nn_xmsg_new (wr->e.gv->xmsgpool, &wr->e.guid, wr->c.pp, 0, NN_XMSG_KIND_CONTROL); #ifdef DDSI_INCLUDE_NETWORK_PARTITIONS