From b913c5da69f362abbb70de6e11baca4cbce2b919 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 22 Mar 2015 23:09:23 +0100 Subject: Added VarInt64, normalized cPacketizer datatype names. --- Tools/ProtoProxy/Connection.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Tools/ProtoProxy/Connection.cpp') diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp index 507d7cb90..f24747a24 100644 --- a/Tools/ProtoProxy/Connection.cpp +++ b/Tools/ProtoProxy/Connection.cpp @@ -805,11 +805,11 @@ bool cConnection::HandleClientHandshake(void) // Send the same packet to the server, but with our port: cByteBuffer Packet(512); - Packet.WriteVarInt(0); // Packet type - initial handshake - Packet.WriteVarInt(ProtocolVersion); + Packet.WriteVarInt32(0); // Packet type - initial handshake + Packet.WriteVarInt32(ProtocolVersion); Packet.WriteVarUTF8String(ServerHost); Packet.WriteBEUInt16(m_Server.GetConnectPort()); - Packet.WriteVarInt(NextState); + Packet.WriteVarInt32(NextState); AString Pkt; Packet.ReadAll(Pkt); cByteBuffer ToServer(512); @@ -2459,7 +2459,7 @@ bool cConnection::HandleServerStatusResponse(void) Log("Cannot find the description json element, ProtoProxy signature not inserted"); } cByteBuffer Packet(Response.size() + 50); - Packet.WriteVarInt(0); // Packet type - status response + Packet.WriteVarInt32(0); // Packet type - status response Packet.WriteVarUTF8String(Response); AString Pkt; Packet.ReadAll(Pkt); @@ -2775,7 +2775,7 @@ bool cConnection::ParseMetadata(cByteBuffer & a_Buffer, AString & a_Metadata) } rs = rs - static_cast(a_Buffer.GetReadableSpace()); cByteBuffer LenBuf(8); - LenBuf.WriteVarInt(Len); + LenBuf.WriteVarInt32(Len); AString VarLen; LenBuf.ReadAll(VarLen); a_Metadata.append(VarLen); @@ -2960,7 +2960,7 @@ void cConnection::SendEncryptionKeyResponse(const AString & a_ServerPublicKey, c DataLog(EncryptedSecret, sizeof(EncryptedSecret), "Encrypted secret (%u bytes)", static_cast(sizeof(EncryptedSecret))); DataLog(EncryptedNonce, sizeof(EncryptedNonce), "Encrypted nonce (%u bytes)", static_cast(sizeof(EncryptedNonce))); cByteBuffer Len(5); - Len.WriteVarInt(static_cast(ToServer.GetReadableSpace())); + Len.WriteVarInt32(static_cast(ToServer.GetReadableSpace())); SERVERSEND(Len); SERVERSEND(ToServer); m_ServerState = csEncryptedUnderstood; -- cgit v1.2.3