try to get the locator kind right when using UDP and the debug monitor port is enabled
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
2ee9e9de02
commit
07600793b6
2 changed files with 5 additions and 14 deletions
|
@ -749,18 +749,13 @@ static os_handle ddsi_tcp_conn_handle (ddsi_tran_base_t base)
|
|||
|
||||
static bool ddsi_tcp_supports (int32_t kind)
|
||||
{
|
||||
return
|
||||
(
|
||||
(config.transport_selector == TRANS_TCP && kind == NN_LOCATOR_KIND_TCPv4)
|
||||
#if OS_SOCKET_HAS_IPV6
|
||||
|| (config.transport_selector == TRANS_TCP6 && kind == NN_LOCATOR_KIND_TCPv6)
|
||||
#endif
|
||||
);
|
||||
return kind == ddsi_tcp_factory_g.m_kind;
|
||||
}
|
||||
|
||||
static int ddsi_tcp_locator (ddsi_tran_base_t base, nn_locator_t *loc)
|
||||
{
|
||||
*loc = gv.extloc;
|
||||
loc->kind = ddsi_tcp_factory_g.m_kind;
|
||||
memcpy(loc->address, gv.extloc.address, sizeof(loc->address));
|
||||
loc->port = base->m_port;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -173,12 +173,8 @@ static os_handle ddsi_udp_conn_handle (ddsi_tran_base_t base)
|
|||
static bool ddsi_udp_supports (int32_t kind)
|
||||
{
|
||||
return
|
||||
(
|
||||
(config.transport_selector == TRANS_UDP && (kind == NN_LOCATOR_KIND_UDPv4 || kind == NN_LOCATOR_KIND_UDPv4MCGEN))
|
||||
#if OS_SOCKET_HAS_IPV6
|
||||
|| (config.transport_selector == TRANS_UDP6 && kind == NN_LOCATOR_KIND_UDPv6)
|
||||
#endif
|
||||
);
|
||||
kind == ddsi_udp_factory_g.m_kind ||
|
||||
(kind == NN_LOCATOR_KIND_UDPv4MCGEN && ddsi_udp_factory_g.m_kind == NN_LOCATOR_KIND_UDPv4);
|
||||
}
|
||||
|
||||
static int ddsi_udp_conn_locator (ddsi_tran_base_t base, nn_locator_t *loc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue