From a8ba939c3313cb634cdb9ab751fca53d5080e00e Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 12 May 2022 16:07:53 -0700 Subject: [PATCH] Make EPICS_CAS_BEACON_ADDR_LIST fall back to EPICS_CA_ADDR_LIST This will allow "simple" configurations that only define EPICS_CA_ADDR_LIST and EPICS_CA_AUTO_ADDR_LIST=NO to get beacons sent to that configured audience. (fixes #7) --- src/pcas/io/bsdSocket/casDGIntfIO.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/pcas/io/bsdSocket/casDGIntfIO.cc b/src/pcas/io/bsdSocket/casDGIntfIO.cc index 6aae7787a..7272a2f8f 100644 --- a/src/pcas/io/bsdSocket/casDGIntfIO.cc +++ b/src/pcas/io/bsdSocket/casDGIntfIO.cc @@ -151,12 +151,18 @@ casDGIntfIO::casDGIntfIO ( caServerI & serverIn, clientBufMemoryManager & memMgr epicsSocketDestroy (this->sock); throw S_cas_bindFail; } - - if ( addConfigBeaconAddr ) { - addAddrToChannelAccessAddressList ( - & BCastAddrList, &EPICS_CAS_BEACON_ADDR_LIST, beaconPort, 0 ); + + if (addConfigBeaconAddr) { + if (envGetConfigParamPtr ( & EPICS_CAS_BEACON_ADDR_LIST ) ) { + addAddrToChannelAccessAddressList ( + & BCastAddrList, & EPICS_CAS_BEACON_ADDR_LIST, beaconPort, 0 ); + } + else { + addAddrToChannelAccessAddressList ( + & BCastAddrList, & EPICS_CA_ADDR_LIST, beaconPort, 0 ); + } } - + removeDuplicateAddresses ( & this->beaconAddrList, & BCastAddrList, 0 ); {