From 2d59e869bc4eecd33bb081b82b19ee8b8b90995e Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Fri, 10 Apr 2020 09:14:16 +0100 Subject: [PATCH] CHostAddr operator== does the job --- src/serverlist.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 6e88ef33..881033ca 100755 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -329,16 +329,12 @@ void CServerListManager::CentralServerRegisterServer ( const CHostAddress& In const int ciInvalidIdx = -1; // Check if server is already registered. - // Use external address and local port to identify a server - // (there could be more than one server on the external address - // but they would have to use separate ports). // The very first list entry must not be checked since // this is per definition the central server (i.e., this server) int iSelIdx = ciInvalidIdx; // initialize with an illegal value for ( int iIdx = 1; iIdx < iCurServerListSize; iIdx++ ) { - if ( ServerList[iIdx].HostAddr == InetAddr - && ServerList[iIdx].iLocalPortNumber == ServerInfo.iLocalPortNumber ) + if ( ServerList[iIdx].HostAddr == InetAddr ) { // store entry index iSelIdx = iIdx;