don't log a no longer relevant FIXME
[deb_libcec.git] / src / lib / adapter / Pulse-Eight / USBCECAdapterMessageQueue.cpp
index 1b14f445f30e9bfc43afbef5304296d3277cb619..a9913ab560af37674f81106e30ca1f6288ba05a2 100644 (file)
@@ -164,14 +164,12 @@ bool CCECAdapterMessageQueueEntry::IsResponse(const CCECAdapterMessage &msg)
       thisMsgCode == MSGCODE_SET_HDMI_VERSION ||
       thisMsgCode == MSGCODE_SET_OSD_NAME ||
       thisMsgCode == MSGCODE_WRITE_EEPROM ||
-      thisMsgCode == MSGCODE_TRANSMIT_IDLETIME)
+      thisMsgCode == MSGCODE_TRANSMIT_IDLETIME ||
+      thisMsgCode == MSGCODE_SET_ACTIVE_SOURCE)
     return thisMsgCode == msgResponse;
 
   if (!m_message->IsTranmission())
-  {
-    m_queue->m_com->m_callback->GetLib()->AddLog(CEC_LOG_WARNING, "FIXME! not a transmission");
     return false;
-  }
 
   return ((msgCode == MSGCODE_COMMAND_ACCEPTED || msgCode == MSGCODE_COMMAND_REJECTED) &&
       (msgResponse == MSGCODE_TRANSMIT_ACK_POLARITY || msgResponse == MSGCODE_TRANSMIT || msgResponse == MSGCODE_TRANSMIT_EOM)) ||
@@ -262,6 +260,9 @@ bool CCECAdapterMessageQueueEntry::MessageReceivedResponse(const CCECAdapterMess
     CLockObject lock(m_mutex);
 #ifdef CEC_DEBUGGING
     m_queue->m_com->m_callback->GetLib()->AddLog(CEC_LOG_DEBUG, "%s - received response - %s", ToString(), message.ToString().c_str());
+#else
+    if (message.IsError())
+      m_queue->m_com->m_callback->GetLib()->AddLog(CEC_LOG_DEBUG, "%s - received response - %s", ToString(), message.ToString().c_str());
 #endif
     m_message->response = message.packet;
     if (m_message->IsTranmission())
@@ -462,7 +463,7 @@ bool CCECAdapterMessageQueue::Write(CCECAdapterMessage *msg)
       m_messages.erase(iEntryId);
     }
 
-    if (msg->ReplyIsError())
+    if (msg->ReplyIsError() && msg->state != ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED)
       msg->state = ADAPTER_MESSAGE_STATE_ERROR;
 
     delete entry;