From e1a797f73cd332329b65f3891ac36c616be55a5f Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Wed, 13 Jun 2018 15:52:43 +0200 Subject: [PATCH] enable SSM support Signed-off-by: Erik Boasson --- src/core/CMakeLists.txt | 2 +- src/core/ddsi/src/q_init.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 83bd7cb..7b6afd4 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -34,7 +34,7 @@ else() add_library(ddsc "") endif() -add_definitions(-DDDSI_INCLUDE_NETWORK_PARTITIONS) +add_definitions(-DDDSI_INCLUDE_NETWORK_PARTITIONS -DDDSI_INCLUDE_SSM) include(ddsi/CMakeLists.txt) include(ddsc/CMakeLists.txt) diff --git a/src/core/ddsi/src/q_init.c b/src/core/ddsi/src/q_init.c index c4dffd9..926a120 100644 --- a/src/core/ddsi/src/q_init.c +++ b/src/core/ddsi/src/q_init.c @@ -287,6 +287,7 @@ static int set_spdp_address (void) const uint32_t port = (uint32_t) (config.port_base + config.port_dg * config.domainId + config.port_d0); int rc = 0; /* FIXME: FIXME: FIXME: */ + gv.loc_spdp_mc.kind = NN_LOCATOR_KIND_INVALID; if (strcmp (config.spdpMulticastAddressString, "239.255.0.1") != 0) { if ((rc = string_to_default_locator (&gv.loc_spdp_mc, config.spdpMulticastAddressString, port, 1, "SPDP address")) < 0) @@ -304,7 +305,7 @@ static int set_spdp_address (void) assert (rc > 0); } #ifdef DDSI_INCLUDE_SSM - if (ddsi_is_ssm_mcaddr (&gv.loc_spdp_mc)) + if (gv.loc_spdp_mc.kind != NN_LOCATOR_KIND_INVALID && ddsi_is_ssm_mcaddr (&gv.loc_spdp_mc)) { NN_ERROR ("%s: SPDP address may not be an SSM address\n", config.spdpMulticastAddressString); return -1;