X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=23afdb623bdfb7c0217fbcd289af5bc1fd129ed7;hb=d297cbd4fc30bc93836532a9a31027b7e64150b3;hp=a4218406f620013555cb63ee1b0d93bdfbb55907;hpb=a7733ae4f8ef999d1b05849ac32037148fb103ef;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index a421840..23afdb6 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -912,7 +912,9 @@ void CCECProcessor::TransmitAbort(cec_logical_address address, cec_opcode opcode void CCECProcessor::ParseCommand(const cec_command &command) { CStdString dataStr; - dataStr.Format(">> %1x%1x:%02x", command.initiator, command.destination, command.opcode); + dataStr.Format(">> %1x%1x", command.initiator, command.destination); + if (command.opcode_set == 1) + dataStr.AppendFormat(":%02x", command.opcode); for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++) dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]); CLibCEC::AddLog(CEC_LOG_TRAFFIC, dataStr.c_str());