updated copyright messages for 2013
[deb_libcec.git] / src / lib / adapter / RPi / RPiCECAdapterMessageQueue.cpp
index df9a374dc4ad07b9746ebcd25a94dc7fff97c980..aa9701d3ec260c26139fc15bc15bd712de4fa051 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -121,7 +121,7 @@ void CRPiCECAdapterMessageQueue::MessageReceived(cec_opcode opcode, cec_logical_
     bHandled = it->second->MessageReceived(opcode, initiator, destination, response);
 
   if (!bHandled)
-    LIB_CEC->AddLog(CEC_LOG_WARNING, "unhandled response received");
+    LIB_CEC->AddLog(CEC_LOG_WARNING, "unhandled response received: opcode=%x initiator=%x destination=%x response=%x", (int)opcode, (int)initiator, (int)destination, response);
 }
 
 bool CRPiCECAdapterMessageQueue::Write(const cec_command &command, bool bIsReply)
@@ -151,11 +151,13 @@ bool CRPiCECAdapterMessageQueue::Write(const cec_command &command, bool bIsReply
       message.payload[iPtr + 1] = command.parameters.At(iPtr);
   }
 
+#ifdef CEC_DEBUGGING
   CStdString strDump;
   strDump.Format("len = %d, payload = %X%X", message.length, (int)message.initiator, (int)message.follower);
   for (uint8_t iPtr = 0; iPtr < message.length - 1; iPtr++)
     strDump.AppendFormat(":%02X", message.payload[iPtr]);
   LIB_CEC->AddLog(CEC_LOG_DEBUG, "sending data: %s", strDump.c_str());
+#endif
 
   int iReturn = vc_cec_send_message2(&message);
 #else
@@ -172,11 +174,13 @@ bool CRPiCECAdapterMessageQueue::Write(const cec_command &command, bool bIsReply
       payload[iPtr + 1] = command.parameters.At(iPtr);
   }
 
+#ifdef CEC_DEBUGGING
   CStdString strDump;
   strDump.Format("len = %d, payload = %X%X", iLength, (int)command.initiator, (int)command.destination);
   for (uint8_t iPtr = 0; iPtr < iLength; iPtr++)
     strDump.AppendFormat(":%02X", payload[iPtr]);
   LIB_CEC->AddLog(CEC_LOG_DEBUG, "sending data: %s", strDump.c_str());
+#endif
 
    int iReturn = vc_cec_send_message((uint32_t)command.destination, (uint8_t*)&payload, iLength, bIsReply);
 #endif