Remove redundant check for endpoint GUID in SEDP

The conversion of incoming discovery data (in "parameter list" format)
check for the presence of the entity GUID parameter for the particular
type of endpoint and use it as the key field in subsequent processing.
If the parameter is absent, deserialisation fails and the handlers are
never called and the old check is therefore no longer necessary.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2020-04-18 12:17:24 +02:00 committed by eboasson
parent d22032c946
commit 080514d45a

View file

@ -1162,9 +1162,7 @@ static void handle_SEDP_alive (const struct receiver_state *rst, seqno_t seq, dd
#endif #endif
assert (datap); assert (datap);
assert (datap->present & PP_ENDPOINT_GUID);
if (!(datap->present & PP_ENDPOINT_GUID))
E (" no guid?\n", err);
GVLOGDISC (" "PGUIDFMT, PGUID (datap->endpoint_guid)); GVLOGDISC (" "PGUIDFMT, PGUID (datap->endpoint_guid));
ppguid.prefix = datap->endpoint_guid.prefix; ppguid.prefix = datap->endpoint_guid.prefix;
@ -1350,11 +1348,7 @@ static void handle_SEDP_dead (const struct receiver_state *rst, ddsi_plist_t *da
{ {
struct ddsi_domaingv * const gv = rst->gv; struct ddsi_domaingv * const gv = rst->gv;
int res; int res;
if (!(datap->present & PP_ENDPOINT_GUID)) assert (datap->present & PP_ENDPOINT_GUID);
{
GVLOGDISC (" no guid?\n");
return;
}
GVLOGDISC (" "PGUIDFMT, PGUID (datap->endpoint_guid)); GVLOGDISC (" "PGUIDFMT, PGUID (datap->endpoint_guid));
if (is_writer_entityid (datap->endpoint_guid.entityid)) if (is_writer_entityid (datap->endpoint_guid.entityid))
res = delete_proxy_writer (gv, &datap->endpoint_guid, timestamp, 0); res = delete_proxy_writer (gv, &datap->endpoint_guid, timestamp, 0);