revert back: code did not work correctly
This commit is contained in:
parent
61e1a73f67
commit
fc4463330b
1 changed files with 2 additions and 15 deletions
|
@ -431,22 +431,9 @@ void CServerListManager::CentralServerQueryServerList ( const CHostAddress& Inet
|
||||||
// otherwise, use the supplied details
|
// otherwise, use the supplied details
|
||||||
if ( iIdx > iNumPredefinedServers )
|
if ( iIdx > iNumPredefinedServers )
|
||||||
{
|
{
|
||||||
// check for server running on the same PC
|
vecServerInfo[iIdx].HostAddr.InetAddr =
|
||||||
if ( vecServerInfo[iIdx].HostAddr.iPort == InetAddr.iPort )
|
ServerList[iIdx].LHostAddr.InetAddr;
|
||||||
{
|
|
||||||
vecServerInfo[iIdx].HostAddr.InetAddr =
|
|
||||||
QHostAddress ( QHostAddress::LocalHost );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// we are not on the same PC but in the same local network
|
|
||||||
vecServerInfo[iIdx].HostAddr.InetAddr =
|
|
||||||
ServerList[iIdx].LHostAddr.InetAddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// take the local port number instead of the received port
|
|
||||||
// number since some NAT (network address translation) might
|
|
||||||
// have changed the port
|
|
||||||
vecServerInfo[iIdx].HostAddr.iPort =
|
vecServerInfo[iIdx].HostAddr.iPort =
|
||||||
ServerList[iIdx].iLocalPortNumber;
|
ServerList[iIdx].iLocalPortNumber;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue