(svn r7931) -Fix (r7759): multiple (different) -O flags made compilations with the wrong optimisations.

This commit is contained in:
rubidium
2007-01-06 22:58:01 +00:00
parent de11447d08
commit 2a596e09f1
5 changed files with 36 additions and 31 deletions

View File

@@ -6,7 +6,7 @@
#ifdef ENABLE_NETWORK
/** DNS hostname of the masterserver */
#define NETWORK_MASTER_SERVER_HOST "master.openttd.org"
#define NETWORK_MASTER_SERVER_HOST "localhost"
/** Message sent to the masterserver to 'identify' this client as OpenTTD */
#define NETWORK_MASTER_SERVER_WELCOME_MESSAGE "OpenTTDRegister"

View File

@@ -116,11 +116,19 @@ void NetworkUDPReceive(const SOCKET udp)
/* 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.
* Assume we received the whole packet. */
/* We got some bytes for the base header of the 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;