Skip to content

Commit

Permalink
fix: message length
Browse files Browse the repository at this point in the history
  • Loading branch information
murilo09 committed Dec 1, 2024
1 parent d2fb634 commit 94ba4a7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions src/server/network/protocol/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ bool Protocol::XTEA_decrypt(NetworkMessage &msg) const {
return false;
}

g_logger().warn("length header {}", msg.getLengthHeader());
msg.setLength(paddingSize);
msg.setLength(messageLength - paddingSize);
return true;
}

Expand Down
3 changes: 0 additions & 3 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ void ProtocolGame::release() {
}

void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingSystem_t operatingSystem) {
g_logger().warn("ProtocolGame login");
// OTCV8 features
if (otclientV8 > 0) {
sendFeatures();
Expand Down Expand Up @@ -704,7 +703,6 @@ void ProtocolGame::logout(bool displayEffect, bool forced) {
}

void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) {
g_logger().warn("ProtocolGame onRecvFirstMessage");
if (g_game().getGameState() == GAME_STATE_SHUTDOWN) {
disconnect();
return;
Expand Down Expand Up @@ -907,7 +905,6 @@ void ProtocolGame::writeToOutputBuffer(const NetworkMessage &msg) {
}

void ProtocolGame::parsePacket(NetworkMessage &msg) {
g_logger().warn("ProtocolGame parsePacket");
if (!acceptPackets || g_game().getGameState() == GAME_STATE_SHUTDOWN || msg.getLength() <= 0) {
return;
}
Expand Down

0 comments on commit 94ba4a7

Please sign in to comment.