From fe2b3a01cf73b2dec12699365a4e5bb9acb689c2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 20 Mar 2021 12:38:51 +0100 Subject: [PATCH] important bugfix --- osal/windows/TmTcWinUdpBridge.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/osal/windows/TmTcWinUdpBridge.cpp b/osal/windows/TmTcWinUdpBridge.cpp index fd289ed8..8755c84a 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,