diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-07 10:01:23 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-07 10:01:23 -0400 |
commit | 94c69b351d3bd49d4856b20c22c9fb420fcaece0 (patch) | |
tree | c3e0cc80f64899711f1ff61ad2674cc2067c6763 /src/pso | |
parent | 9ab79683d722987d34fd6da194958284ca805e23 (diff) |
TProtocol: Rename `packet.packet` -> `packet.pkt`
Diffstat (limited to 'src/pso')
-rw-r--r-- | src/pso/TProtocol.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pso/TProtocol.cpp b/src/pso/TProtocol.cpp index e3c45a9..0970d39 100644 --- a/src/pso/TProtocol.cpp +++ b/src/pso/TProtocol.cpp @@ -31,13 +31,13 @@ void TProtocol::parse_packet() { m_packet.bytes[m_packet_offset++] = next(); if (m_packet_offset == sizeof(packet_header)) { if (m_is_encrypted) { - m_recv_crypt.encrypt(&m_packet.packet.header, sizeof(packet_header)); + m_recv_crypt.encrypt(&m_packet.pkt.header, sizeof(packet_header)); } } // NOTE: The `const int &` is required here to match. // Convert packet size to native endian. - const int &packet_size = m_packet_size = to_be_uint16_t(m_packet.packet.header.size); + const int &packet_size = m_packet_size = to_be_uint16_t(m_packet.pkt.header.size); // Is the packet size invalid? if (packet_size > max_packet_size || !packet_size) { m_packet_size = 0; @@ -48,13 +48,13 @@ void TProtocol::parse_packet() { } else if (m_packet_size > 0 && m_packet_offset >= m_packet_size) { // Decrypt it if necessary. if (m_is_encrypted) { - m_recv_crypt.encrypt(&m_packet.packet.data, m_packet_size-sizeof(packet_header)); + m_recv_crypt.encrypt(&m_packet.pkt.data, m_packet_size-sizeof(packet_header)); } struct packet *pkt = &m_packet; m_packet_size = 0; m_packet_offset = 0; if (m_handle_pings_only) { - if (pkt->packet.header.command == 0x1d) { + if (pkt->pkt.header.command == 0x1d) { if (!handle_command(pkt)) { continue; } else { |