1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Fix error handling on inconsistent client ready message

Fix android makefile to provide a correct dummy githash if detection fails
This commit is contained in:
sapier 2014-07-16 20:01:00 +02:00
parent 7d72ac6a69
commit d38f6ebb9b
2 changed files with 13 additions and 3 deletions

View file

@ -1732,14 +1732,20 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
if (playersao == NULL) {
errorstream
<< "TOSERVER_CLIENT_READY stage 2 client init failed for peer "
<< "TOSERVER_CLIENT_READY stage 2 client init failed for peer_id: "
<< peer_id << std::endl;
m_con.DisconnectPeer(peer_id);
return;
}
if(datasize < 2+8)
if(datasize < 2+8) {
errorstream
<< "TOSERVER_CLIENT_READY client sent inconsistent data, disconnecting peer_id: "
<< peer_id << std::endl;
m_con.DisconnectPeer(peer_id);
return;
}
m_clients.setClientVersion(
peer_id,