fixed - log failed acks and other errors in the debug log again
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 11 Oct 2012 12:02:21 +0000 (14:02 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 11 Oct 2012 12:02:21 +0000 (14:02 +0200)
src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp

index 1b14f445f30e9bfc43afbef5304296d3277cb619..7ad06072d6c2730d29348de5cf3df5e7d14cecd0 100644 (file)
@@ -262,6 +262,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 +465,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;