mirror of https://github.com/OpenTTD/OpenTTD
(svn r4413) -Fix: fixed a bug which pushed the client back to the main menu when a
server is in the mainserver-list which sends out illegal signals. Many tnx to 'test' for finding and isolating the problem. -Fix: also specify the problem a bit betterrelease/0.5
parent
060d5143ef
commit
4a4b860ee7
|
@ -125,7 +125,7 @@ static NetworkRecvStatus CloseConnection(NetworkClientState *cs)
|
||||||
NetworkCloseClient(cs);
|
NetworkCloseClient(cs);
|
||||||
|
|
||||||
// Clients drop back to the main menu
|
// Clients drop back to the main menu
|
||||||
if (!_network_server) {
|
if (!_network_server && _networking) {
|
||||||
_switch_mode = SM_MENU;
|
_switch_mode = SM_MENU;
|
||||||
_networking = false;
|
_networking = false;
|
||||||
_switch_mode_errorstr = STR_NETWORK_ERR_LOSTCONNECTION;
|
_switch_mode_errorstr = STR_NETWORK_ERR_LOSTCONNECTION;
|
||||||
|
|
|
@ -328,8 +328,12 @@ static void NetworkHandleUDPPacket(Packet* p, struct sockaddr_in* client_addr)
|
||||||
|
|
||||||
if (type < PACKET_UDP_END && _network_udp_packet[type] != NULL && !_udp_cs.quited) {
|
if (type < PACKET_UDP_END && _network_udp_packet[type] != NULL && !_udp_cs.quited) {
|
||||||
_network_udp_packet[type](p, client_addr);
|
_network_udp_packet[type](p, client_addr);
|
||||||
} else {
|
} else {
|
||||||
DEBUG(net, 0)("[NET][UDP] Received invalid packet type %d", type);
|
if (!_udp_cs.quited) {
|
||||||
|
DEBUG(net, 0)("[NET][UDP] Received invalid packet type %d", type);
|
||||||
|
} else {
|
||||||
|
DEBUG(net, 0)("[NET][UDP] Received illegal packet");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue