cec: fix active source switches for the standard CEC implementation. added some log...
[deb_libcec.git] / src / lib / CECProcessor.cpp
index 20b8e059f329f210400fd9570af8c0c5f571fa25..00d7744825254abba1c8f09b04d2a7fcec16dd1c 100644 (file)
@@ -853,6 +853,12 @@ bool CCECProcessor::IsActiveSource(cec_logical_address iAddress)
 
 bool CCECProcessor::Transmit(const cec_command &data)
 {
+  if (m_logicalAddresses[(uint8_t)data.destination])
+  {
+    CLibCEC::AddLog(CEC_LOG_WARNING, "not sending data to myself!");
+    return false;
+  }
+
   cec_adapter_message_state retVal(ADAPTER_MESSAGE_STATE_UNKNOWN);
   {
     CLockObject lock(m_mutex);