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

@@ -155,16 +155,14 @@ void ServerResponseHandler::handleResponse(osiSockAddr* responseFrom,
{
if(command<0||command>=(int8)m_handlerTable.size())
{
LOG(logLevelDebug,
LOG(logLevelError,
"Invalid (or unsupported) command: %x.", (0xFF&command));
// TODO remove debug output
std::ostringstream name;
name<<"Invalid PVA header "<<hex<<(int)(0xFF&command);
name<<", its payload buffer";
hexDump(name.str(), (const int8*)payloadBuffer->getArray(),
payloadBuffer->getPosition(), payloadSize);
if(pvAccessIsLoggable(logLevelError)) {
std::cerr<<"Invalid PVA header "<<hex<<(int)(0xFF&command)
<<", its payload buffer\n"
<<HexDump(*payloadBuffer, payloadSize);
}
return;
}