mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
made some output just show up on debug
This commit is contained in:
parent
1359db5476
commit
7a20c313ee
|
@ -845,22 +845,24 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char aHex[] = "0123456789ABCDEF";
|
if(g_Config.m_Debug)
|
||||||
char aBuf[512];
|
|
||||||
|
|
||||||
for(int b = 0; b < pPacket->m_DataSize && b < 32; b++)
|
|
||||||
{
|
{
|
||||||
aBuf[b*3] = aHex[((const unsigned char *)pPacket->m_pData)[b]>>4];
|
char aHex[] = "0123456789ABCDEF";
|
||||||
aBuf[b*3+1] = aHex[((const unsigned char *)pPacket->m_pData)[b]&0xf];
|
char aBuf[512];
|
||||||
aBuf[b*3+2] = ' ';
|
|
||||||
aBuf[b*3+3] = 0;
|
for(int b = 0; b < pPacket->m_DataSize && b < 32; b++)
|
||||||
|
{
|
||||||
|
aBuf[b*3] = aHex[((const unsigned char *)pPacket->m_pData)[b]>>4];
|
||||||
|
aBuf[b*3+1] = aHex[((const unsigned char *)pPacket->m_pData)[b]&0xf];
|
||||||
|
aBuf[b*3+2] = ' ';
|
||||||
|
aBuf[b*3+3] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char aBufMsg[256];
|
||||||
|
str_format(aBufMsg, sizeof(aBufMsg), "strange message ClientId=%d msg=%d data_size=%d", ClientId, Msg, pPacket->m_DataSize);
|
||||||
|
Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "server", aBufMsg);
|
||||||
|
Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "server", aBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
char aBufMsg[256];
|
|
||||||
str_format(aBufMsg, sizeof(aBufMsg), "strange message ClientId=%d msg=%d data_size=%d", ClientId, Msg, pPacket->m_DataSize);
|
|
||||||
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBufMsg);
|
|
||||||
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBuf);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue