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 <eb@ilities.com>
This commit is contained in:
Erik Boasson 2020-06-22 17:32:52 +02:00 committed by eboasson
parent 312df32605
commit b5c0eab2fb

View file

@ -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