(svn r7932) -Fix (r7931): committed a few files too much :( (the ones I used to test the new masterserver)
authorrubidium
Sat, 06 Jan 2007 23:00:21 +0000
changeset 5552 527df7300907
parent 5551 bfd85f0c196d
child 5553 24054eb99723
(svn r7932) -Fix (r7931): committed a few files too much :( (the ones I used to test the new masterserver)
src/network/core/config.h
src/network/core/udp.c
src/network/network_udp.c
--- a/src/network/core/config.h	Sat Jan 06 22:58:01 2007 +0000
+++ b/src/network/core/config.h	Sat Jan 06 23:00:21 2007 +0000
@@ -6,7 +6,7 @@
 #ifdef ENABLE_NETWORK
 
 /** DNS hostname of the masterserver */
-#define NETWORK_MASTER_SERVER_HOST "localhost"
+#define NETWORK_MASTER_SERVER_HOST "master.openttd.org"
 /** Message sent to the masterserver to 'identify' this client as OpenTTD */
 #define NETWORK_MASTER_SERVER_WELCOME_MESSAGE "OpenTTDRegister"
 
--- a/src/network/core/udp.c	Sat Jan 06 22:58:01 2007 +0000
+++ b/src/network/core/udp.c	Sat Jan 06 23:00:21 2007 +0000
@@ -116,19 +116,11 @@
 	/* Try to receive anything */
 	nbytes = recvfrom(udp, p.buffer, packet_len, 0, (struct sockaddr *)&client_addr, &client_len);
 
-	/* We got some bytes for the base header of the packet. */
+	/* We got some bytes for the base header of the packet.
+	 * Assume we received the whole packet. */
 	if (nbytes > 2) {
 		NetworkRecv_ReadPacketSize(&p);
 
-		/* If the size does not match the packet must be corrupted.
-		 * Otherwise it will be marked as corrupted later on. */
-		if (nbytes != p.size) {
-			DEBUG(net, 1, "received a packet with mismatching size from %s:%d",
-					inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port));
-
-			return;
-		}
-
 		/* Put the position on the right place */
 		p.pos = 2;
 		p.next = NULL;
--- a/src/network/network_udp.c	Sat Jan 06 22:58:01 2007 +0000
+++ b/src/network/network_udp.c	Sat Jan 06 23:00:21 2007 +0000
@@ -53,7 +53,7 @@
 	NetworkSend_NetworkGameInfo(packet, &_network_game_info);
 
 	// Let the client know that we are here
-//	NetworkSendUDP_Packet(_udp_server_socket, packet, client_addr);
+	NetworkSendUDP_Packet(_udp_server_socket, packet, client_addr);
 
 	free(packet);