diff src/openttd.cpp @ 10822:db2fdef51d46 draft

(svn r15157) -Codechange: wrap the hostname/ip and port into a single structure so we can pass either one of them and not convert an ip to a string and then back again.
author rubidium <rubidium@openttd.org>
date Tue, 20 Jan 2009 01:32:06 +0000
parents 0b7a4eee5b46
children ee1bc768c051
line wrap: on
line diff
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -681,7 +681,7 @@
 		ParseConnectionString(&not_used, &port, debuglog_conn);
 		if (port != NULL) rport = atoi(port);
 
-		NetworkStartDebugLog(debuglog_conn, rport);
+		NetworkStartDebugLog(NetworkAddress(debuglog_conn, rport));
 	}
 #endif /* ENABLE_NETWORK */
 
@@ -728,7 +728,7 @@
 
 			LoadIntroGame();
 			_switch_mode = SM_NONE;
-			NetworkClientConnectGame(network_conn, rport);
+			NetworkClientConnectGame(NetworkAddress(network_conn, rport));
 		}
 	}
 #endif /* ENABLE_NETWORK */
@@ -1219,7 +1219,7 @@
 		if (_network_reconnect > 0 && --_network_reconnect == 0) {
 			/* This means that we want to reconnect to the last host
 			 * We do this here, because it means that the network is really closed */
-			NetworkClientConnectGame(_settings_client.network.last_host, _settings_client.network.last_port);
+			NetworkClientConnectGame(NetworkAddress(_settings_client.network.last_host, _settings_client.network.last_port));
 		}
 		/* Singleplayer */
 		StateGameLoop();