rsrv: decouple some client/server config

the automatic beacon address list should follow
the server interface address list, and not be
effected by any client config.

Also, don't populate the interface address list
from EPICS_CAS_BEACON_ADDR_LIST as this will
almost never contain local interface addresses.
This commit is contained in:
Michael Davidsaver
2016-01-29 08:33:41 -05:00
parent 1c1eb030a9
commit 167dea3735

View File

@@ -284,10 +284,7 @@ void rsrv_build_addr_lists(void)
assert(ca_beacon_port!=0);
assert(ca_udp_port!=0);
if(envGetConfigParamPtr(&EPICS_CAS_AUTO_BEACON_ADDR_LIST))
envGetBoolConfigParam(&EPICS_CAS_AUTO_BEACON_ADDR_LIST, &autobeaconlist);
else
envGetBoolConfigParam(&EPICS_CA_AUTO_ADDR_LIST, &autobeaconlist);
envGetBoolConfigParam(&EPICS_CAS_AUTO_BEACON_ADDR_LIST, &autobeaconlist);
ellInit ( &casIntfAddrList );
ellInit ( &beaconAddrList );
@@ -325,8 +322,7 @@ void rsrv_build_addr_lists(void)
{
ELLLIST temp = ELLLIST_INIT;
/* use the first parameter which is set. */
if(addAddrToChannelAccessAddressList ( &temp, &EPICS_CAS_INTF_ADDR_LIST, ca_udp_port, 0 ))
addAddrToChannelAccessAddressList ( &temp, &EPICS_CAS_BEACON_ADDR_LIST, ca_udp_port, 0 );
addAddrToChannelAccessAddressList ( &temp, &EPICS_CAS_INTF_ADDR_LIST, ca_udp_port, 0 );
removeDuplicateAddresses(&casIntfAddrList, &temp, 0);
}
@@ -398,8 +394,7 @@ void rsrv_build_addr_lists(void)
/* collect user specified beacon address list
* prefer EPICS_CAS_BEACON_ADDR_LIST, fallback to EPICS_CA_ADDR_LIST
*/
if(addAddrToChannelAccessAddressList ( &temp, &EPICS_CAS_BEACON_ADDR_LIST, ca_beacon_port, 0 ))
addAddrToChannelAccessAddressList ( &temp, &EPICS_CA_ADDR_LIST, ca_beacon_port, 1 );
addAddrToChannelAccessAddressList ( &temp, &EPICS_CAS_BEACON_ADDR_LIST, ca_beacon_port, 0 );
if (autobeaconlist) {
/* auto populate with all broadcast addresses.