redo hexDump

ludicrously inefficient (cf. toHex() ), and inflexible.
This commit is contained in:
Michael Davidsaver
2019-03-06 10:32:53 -08:00
parent 732fd1f771
commit ecee708d3a
7 changed files with 121 additions and 157 deletions

View File

@@ -2998,10 +2998,14 @@ public:
{
if (command < 0 || command >= (int8)m_handlerTable.size())
{
// TODO remove debug output
char buf[100];
sprintf(buf, "Invalid (or unsupported) command %d, its payload", command);
hexDump(buf, (const int8*)(payloadBuffer->getArray()), payloadBuffer->getPosition(), payloadSize);
LOG(logLevelError,
"Invalid (or unsupported) command: %x.", (0xFF&command));
if(pvAccessIsLoggable(logLevelError)) {
std::cerr<<"Invalid PVA header "<<hex<<(int)(0xFF&command)
<<", its payload buffer\n"
<<HexDump(*payloadBuffer, payloadSize);
}
return;
}
// delegate