mirror of
https://github.com/minetest/minetest.git
synced 2025-07-04 17:00:23 +02:00
Clean up some packet-related code
This commit is contained in:
@ -273,7 +273,7 @@ void TestConnection::testConnectSendReceive()
|
||||
UASSERT(server.ReceiveTimeoutMs(&recvpacket, timeout_ms));
|
||||
infostream << "** Server received: peer_id=" << pkt.getPeerId()
|
||||
<< ", size=" << pkt.getSize()
|
||||
<< ", data=" << (const char*)pkt.getU8Ptr(0)
|
||||
<< ", data=" << pkt.getString(0)
|
||||
<< std::endl;
|
||||
|
||||
auto recvdata = pkt.oldForgePacket();
|
||||
@ -298,7 +298,7 @@ void TestConnection::testConnectSendReceive()
|
||||
infostream << " ";
|
||||
char buf[10];
|
||||
porting::mt_snprintf(buf, sizeof(buf), "%.2X",
|
||||
((int)((const char *)pkt.getU8Ptr(0))[i]) & 0xff);
|
||||
((int)(pkt.getString(0))[i]) & 0xff);
|
||||
infostream<<buf;
|
||||
}
|
||||
if (datasize > 20)
|
||||
|
Reference in New Issue
Block a user