Fix assertion in WHC transient-local handling
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
0c23eea7cb
commit
7feab2e982
1 changed files with 2 additions and 9 deletions
|
@ -981,21 +981,14 @@ static uint32_t whc_default_remove_acked_messages_full (struct whc_impl *whc, se
|
||||||
/* Delete it - but this may not result in deleting the index node as
|
/* Delete it - but this may not result in deleting the index node as
|
||||||
there must still be a more recent one available */
|
there must still be a more recent one available */
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
struct whc_node whcn_template;
|
struct whc_idxnode template;
|
||||||
union {
|
template.iid = idxn->iid;
|
||||||
struct whc_idxnode idxn;
|
|
||||||
char pad[sizeof (struct whc_idxnode) + sizeof (struct whc_node *)];
|
|
||||||
} template;
|
|
||||||
template.idxn.headidx = 0;
|
|
||||||
template.idxn.hist[0] = &whcn_template;
|
|
||||||
whcn_template.serdata = ddsi_serdata_ref (oldn->serdata);
|
|
||||||
assert (oldn->seq < whcn->seq);
|
assert (oldn->seq < whcn->seq);
|
||||||
#endif
|
#endif
|
||||||
TRACE (" del %p %"PRId64, (void *) oldn, oldn->seq);
|
TRACE (" del %p %"PRId64, (void *) oldn, oldn->seq);
|
||||||
whc_delete_one (whc, oldn);
|
whc_delete_one (whc, oldn);
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
assert (ddsrt_hh_lookup (whc->idx_hash, &template) == idxn);
|
assert (ddsrt_hh_lookup (whc->idx_hash, &template) == idxn);
|
||||||
ddsi_serdata_unref (whcn_template.serdata);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue