Changeset - r25305:ecd5783e4abe
[Not reviewed]
master
0 3 0
Patric Stout - 3 years ago 2021-04-29 10:01:54
truebrain@openttd.org
Cleanup: remove write-only variable "hostname" in NetworkGameList
3 files changed with 0 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/network/core/game_info.h
Show inline comments
 
@@ -74,7 +74,6 @@ struct NetworkGameInfo : NetworkServerGa
 
	uint16 map_width;                               ///< Map width
 
	uint16 map_height;                              ///< Map height
 
	char server_name[NETWORK_NAME_LENGTH];          ///< Server name
 
	char hostname[NETWORK_HOSTNAME_LENGTH];         ///< Hostname of the server (if any)
 
	char server_revision[NETWORK_REVISION_LENGTH];  ///< The version number the server is using (e.g.: 'r304' or 0.5.0)
 
	bool dedicated;                                 ///< Is this a dedicated server?
 
	bool version_compatible;                        ///< Can we connect to this server or not? (based on server_revision)
src/network/network_gamelist.cpp
Show inline comments
 
@@ -51,7 +51,6 @@ static void NetworkGameListHandleDelayed
 
				ClearGRFConfigList(&item->info.grfconfig);
 
				memset(&item->info, 0, sizeof(item->info));
 
				strecpy(item->info.server_name, ins_item->info.server_name, lastof(item->info.server_name));
 
				strecpy(item->info.hostname, ins_item->info.hostname, lastof(item->info.hostname));
 
				item->online = false;
 
			}
 
			item->manually |= ins_item->manually;
src/network/network_udp.cpp
Show inline comments
 
@@ -92,7 +92,6 @@ static void DoNetworkUDPQueryServer(Netw
 
	/* Clear item in gamelist */
 
	NetworkGameList *item = CallocT<NetworkGameList>(1);
 
	address.GetAddressAsString(item->info.server_name, lastof(item->info.server_name));
 
	strecpy(item->info.hostname, address.GetHostname(), lastof(item->info.hostname));
 
	item->address = address;
 
	item->manually = manually;
 
	NetworkGameListAddItemDelayed(item);
 
@@ -365,10 +364,6 @@ void ClientNetworkUDPSocketHandler::Rece
 
		}
 
	}
 

	
 
	if (item->info.hostname[0] == '\0') {
 
		seprintf(item->info.hostname, lastof(item->info.hostname), "%s", client_addr->GetHostname());
 
	}
 

	
 
	if (client_addr->GetAddress()->ss_family == AF_INET6) {
 
		strecat(item->info.server_name, " (IPv6)", lastof(item->info.server_name));
 
	}
0 comments (0 inline, 0 general)