diff options
author | est31 <MTest31@outlook.com> | 2015-05-16 01:19:43 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-05-16 21:17:28 +0200 |
commit | 8dbf68331386f5f6a40ff0f0a77f5390bdca60b9 (patch) | |
tree | 2fe3a94702dcda55b41f614466306ab62e0b98bf /src/network/clientpackethandler.cpp | |
parent | 19cbb6b37b9a35df7892bde5aad138266496eb8f (diff) | |
download | minetest-8dbf68331386f5f6a40ff0f0a77f5390bdca60b9.tar.gz minetest-8dbf68331386f5f6a40ff0f0a77f5390bdca60b9.tar.bz2 minetest-8dbf68331386f5f6a40ff0f0a77f5390bdca60b9.zip |
Finalize init packets and enable protocol v25
This enables srp.
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r-- | src/network/clientpackethandler.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 2106e4368..1f13c62f9 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -44,26 +44,31 @@ void Client::handleCommand_Hello(NetworkPacket* pkt) if (pkt->getSize() < 1) return; - u8 deployed; + u8 serialization_ver; + u16 proto_ver; + u16 compression_mode; u32 auth_mechs; std::string username_legacy; // for case insensitivity - *pkt >> deployed >> auth_mechs >> username_legacy; + *pkt >> serialization_ver >> compression_mode >> proto_ver + >> auth_mechs >> username_legacy; // Chose an auth method we support AuthMechanism chosen_auth_mechanism = choseAuthMech(auth_mechs); infostream << "Client: TOCLIENT_HELLO received with " - "deployed=" << ((int)deployed & 0xff) << ", auth_mechs=" - << auth_mechs << ", chosen=" << chosen_auth_mechanism << std::endl; + << "serialization_ver=" << serialization_ver + << ", auth_mechs=" << auth_mechs + << ", compression_mode=" << compression_mode + << ". Doing auth with mech " << chosen_auth_mechanism << std::endl; - if (!ser_ver_supported(deployed)) { + if (!ser_ver_supported(serialization_ver)) { infostream << "Client: TOCLIENT_HELLO: Server sent " << "unsupported ser_fmt_ver"<< std::endl; return; } - m_server_ser_ver = deployed; - m_proto_ver = deployed; + m_server_ser_ver = serialization_ver; + m_proto_ver = proto_ver; //TODO verify that username_legacy matches sent username, only // differs in casing (make both uppercase and compare) |