some fixes
This commit is contained in:
parent
46b9d13274
commit
b434927457
1 changed files with 24 additions and 19 deletions
|
@ -215,11 +215,14 @@ void CServerListManager::QueryServerList ( const CHostAddress& InetAddr )
|
||||||
// copy list item
|
// copy list item
|
||||||
vecServerInfo[iIdx] = ServerList[iIdx];
|
vecServerInfo[iIdx] = ServerList[iIdx];
|
||||||
|
|
||||||
// check if the address of the client which is requesting the list
|
if ( iIdx > 0 )
|
||||||
// is the same address as one server in the list -> in this case
|
{
|
||||||
// he has to connect to the local host address, unfortunately, the
|
// check if the address of the client which is requesting the
|
||||||
// port number is not known (because of NAT port translating) so we
|
// list is the same address as one server in the list -> in this
|
||||||
// assume that it is the default llcon port number
|
// case he has to connect to the local host address,
|
||||||
|
// unfortunately, the port number is not known (because of NAT
|
||||||
|
// port translating) so we assume that it is the default llcon
|
||||||
|
// port number
|
||||||
if ( vecServerInfo[iIdx].HostAddr.InetAddr == InetAddr.InetAddr )
|
if ( vecServerInfo[iIdx].HostAddr.InetAddr == InetAddr.InetAddr )
|
||||||
{
|
{
|
||||||
vecServerInfo[iIdx].HostAddr.InetAddr.
|
vecServerInfo[iIdx].HostAddr.InetAddr.
|
||||||
|
@ -227,17 +230,19 @@ void CServerListManager::QueryServerList ( const CHostAddress& InetAddr )
|
||||||
|
|
||||||
vecServerInfo[iIdx].HostAddr.iPort = LLCON_DEFAULT_PORT_NUMBER;
|
vecServerInfo[iIdx].HostAddr.iPort = LLCON_DEFAULT_PORT_NUMBER;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// create "send empty message" for all registered servers (except
|
|
||||||
// of the very first list entry since this is this server (central
|
|
||||||
// server) per definition)
|
|
||||||
if ( iIdx > 0 )
|
|
||||||
{
|
{
|
||||||
|
// create "send empty message" for all registered servers
|
||||||
|
// (except of the very first list entry since this is this
|
||||||
|
// server (central server) per definition) and also it is
|
||||||
|
// not required to send this message, if the server is on
|
||||||
|
// the same computer
|
||||||
pConnLessProtocol->CreateCLSendEmptyMesMes (
|
pConnLessProtocol->CreateCLSendEmptyMesMes (
|
||||||
vecServerInfo[iIdx].HostAddr,
|
vecServerInfo[iIdx].HostAddr,
|
||||||
InetAddr );
|
InetAddr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// send the server list to the client
|
// send the server list to the client
|
||||||
pConnLessProtocol->CreateCLServerListMes ( InetAddr, vecServerInfo );
|
pConnLessProtocol->CreateCLServerListMes ( InetAddr, vecServerInfo );
|
||||||
|
|
Loading…
Reference in a new issue