Changeset - r11740:6a9c3e3bc10f
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2009-04-24 10:52:51
rubidium@openttd.org
(svn r16135) -Fix [FS#2856]: always give the server an already resolved 'client address' so we can be sure the client address is always resolved
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/network/network.cpp
Show inline comments
 
@@ -748,6 +748,11 @@ static void NetworkInitGameInfo()
 

	
 
	NetworkClientInfo *ci = new NetworkClientInfo(CLIENT_ID_SERVER);
 
	ci->client_playas = _network_dedicated ? COMPANY_SPECTATOR : _local_company;
 
	/* Give the server a valid IP; banning it is pointless anyways */
 
	sockaddr_in sock;
 
	memset(&sock, 0, sizeof(sock));
 
	sock.sin_family = AF_INET;
 
	ci->client_address = NetworkAddress((sockaddr*)&sock, sizeof(sock));
 

	
 
	strecpy(ci->client_name, _settings_client.network.client_name, lastof(ci->client_name));
 
	strecpy(ci->unique_id, _settings_client.network.network_id, lastof(ci->unique_id));
0 comments (0 inline, 0 general)