aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-07-16 20:01:00 +0200
committersapier <Sapier at GMX dot net>2014-07-16 20:01:00 +0200
commitd38f6ebb9bb9ff201b3a1e19a8e6ad311dbe4972 (patch)
tree72e4823f34c274519c92f882f2297dede6536b0b /src
parent7d72ac6a6954e25d635795e099fbe51e4a668df9 (diff)
downloadminetest-d38f6ebb9bb9ff201b3a1e19a8e6ad311dbe4972.tar.gz
minetest-d38f6ebb9bb9ff201b3a1e19a8e6ad311dbe4972.tar.bz2
minetest-d38f6ebb9bb9ff201b3a1e19a8e6ad311dbe4972.zip
Fix error handling on inconsistent client ready message
Fix android makefile to provide a correct dummy githash if detection fails
Diffstat (limited to 'src')
-rw-r--r--src/server.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 1e644ce6c..40857f84d 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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,