diff --git a/src/ca/caProto.h b/src/ca/caProto.h index 2476ad1aa..5dfcac50a 100644 --- a/src/ca/caProto.h +++ b/src/ca/caProto.h @@ -81,10 +81,8 @@ * "EPICS_CA_SERVER_PORT" */ #define CA_PORT_BASE IPPORT_USERRESERVED + 56U -#define CA_SERVER_PORT static_cast \ - (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u) -#define CA_REPEATER_PORT static_cast \ - (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u) +#define CA_SERVER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u) +#define CA_REPEATER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u) /* * 1500 (max of ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP) * (the MTU of Ethernet is currently independent of its speed varient) diff --git a/src/ca/casw.cpp b/src/ca/casw.cpp index 9f3dfd89d..a5f16f676 100644 --- a/src/ca/casw.cpp +++ b/src/ca/casw.cpp @@ -35,10 +35,12 @@ int main ( int, char ** ) int status; serverPort = - envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT, CA_SERVER_PORT ); + envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT, + static_cast (CA_SERVER_PORT) ); repeaterPort = - envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT ); + envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, + static_cast (CA_REPEATER_PORT) ); caStartRepeaterIfNotInstalled ( repeaterPort ); diff --git a/src/ca/repeater.cpp b/src/ca/repeater.cpp index 5071ae49f..3a12f13d2 100644 --- a/src/ca/repeater.cpp +++ b/src/ca/repeater.cpp @@ -504,7 +504,8 @@ void ca_repeater () assert ( osiSockAttach() ); - port = envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT ); + port = envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, + static_cast (CA_REPEATER_PORT) ); msr = makeSocket ( port, true ); if ( msr.sock == INVALID_SOCKET ) { diff --git a/src/ca/udpiiu.cpp b/src/ca/udpiiu.cpp index a61c3294b..ff25a5088 100644 --- a/src/ca/udpiiu.cpp +++ b/src/ca/udpiiu.cpp @@ -61,10 +61,12 @@ udpiiu::udpiiu ( cac &cac ) : int status; this->repeaterPort = - envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT ); + envGetInetPortConfigParam ( &EPICS_CA_REPEATER_PORT, + static_cast (CA_REPEATER_PORT) ); this->serverPort = - envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT, CA_SERVER_PORT ); + envGetInetPortConfigParam ( &EPICS_CA_SERVER_PORT, + static_cast (CA_SERVER_PORT) ); this->sock = socket ( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); if ( this->sock == INVALID_SOCKET ) {