mirror of
https://github.com/nostar/urfd.git
synced 2026-11-08 04:19:39 +00:00
dump unknown YSF packets if DEBUG
This commit is contained in:
1 parent
0ce166fa15
commit
7dd9caf7eb
1 file changed
+11
-3
@@ -188,9 +188,11 @@ void CYsfProtocol::Task(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
// std::string title("Unknown YSF packet from ");
|
||||
// title += Ip.GetAddress();
|
||||
// Buffer.Dump(title);
|
||||
#ifdef DEBUG
|
||||
std::string title("Unknown YSF packet from ");
|
||||
title += Ip.GetAddress();
|
||||
Buffer.Dump(title);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -773,7 +775,13 @@ bool CYsfProtocol::IsValidwirexPacket(const CBuffer &Buffer, CYSFFICH *Fich, CCa
|
||||
{
|
||||
unsigned char crc = CCRC::addCRC(command, i + 1U);
|
||||
if (crc == command[i + 1U])
|
||||
{
|
||||
valid = true;
|
||||
#ifdef DEBUG
|
||||
if (! valid)
|
||||
std::cout << "WiresX command CRC failed:" << (int)crc << " != " << (int)command[i + 1U] << std::endl;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user