diff --git a/datapoollocal/LocalPoolDataSetBase.cpp b/datapoollocal/LocalPoolDataSetBase.cpp index 7f181c930..a72e9db11 100644 --- a/datapoollocal/LocalPoolDataSetBase.cpp +++ b/datapoollocal/LocalPoolDataSetBase.cpp @@ -58,8 +58,7 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(sid_t sid, PoolVariableIF** registere this->sid = sid; } -LocalPoolDataSetBase::LocalPoolDataSetBase( - PoolVariableIF **registeredVariablesArray, +LocalPoolDataSetBase::LocalPoolDataSetBase(PoolVariableIF **registeredVariablesArray, const size_t maxNumberOfVariables, bool protectEveryReadCommitCall): PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) { this->setReadCommitProtectionBehaviour(protectEveryReadCommitCall); diff --git a/osal/linux/TmTcUnixUdpBridge.cpp b/osal/linux/TmTcUnixUdpBridge.cpp index 2f620849b..fa7913ea6 100644 --- a/osal/linux/TmTcUnixUdpBridge.cpp +++ b/osal/linux/TmTcUnixUdpBridge.cpp @@ -150,11 +150,9 @@ void TmTcUnixUdpBridge::checkAndSetClientAddress(sockaddr_in& newAddress) { #endif registerCommConnect(); - /* Set new IP address if it has changed. */ - if(clientAddress.sin_addr.s_addr != newAddress.sin_addr.s_addr) { - clientAddress = newAddress; - clientAddressLen = sizeof(clientAddress); - } + /* Set new IP address to reply to. */ + clientAddress = newAddress; + clientAddressLen = sizeof(clientAddress); } void TmTcUnixUdpBridge::setMutexProperties(MutexIF::TimeoutType timeoutType, diff --git a/osal/windows/TmTcWinUdpBridge.cpp b/osal/windows/TmTcWinUdpBridge.cpp index fd289ed8d..8755c84a2 100644 --- a/osal/windows/TmTcWinUdpBridge.cpp +++ b/osal/windows/TmTcWinUdpBridge.cpp @@ -58,6 +58,9 @@ ReturnValue_t TmTcWinUdpBridge::initialize() { hints.ai_family = AF_INET; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; + /* See: + https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo + for information about AI_PASSIVE. */ hints.ai_flags = AI_PASSIVE; /* Set up UDP socket: @@ -151,11 +154,9 @@ void TmTcWinUdpBridge::checkAndSetClientAddress(sockaddr_in& newAddress) { #endif registerCommConnect(); - /* Set new IP address if it has changed. */ - if(clientAddress.sin_addr.s_addr != newAddress.sin_addr.s_addr) { - clientAddress = newAddress; - clientAddressLen = sizeof(clientAddress); - } + /* Set new IP address to reply to */ + clientAddress = newAddress; + clientAddressLen = sizeof(clientAddress); } void TmTcWinUdpBridge::setMutexProperties(MutexIF::TimeoutType timeoutType,