From: Lars Op den Kamp Date: Thu, 11 Oct 2012 12:02:21 +0000 (+0200) Subject: fixed - log failed acks and other errors in the debug log again X-Git-Tag: upstream/2.2.0~1^2~15^2^2~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1e9904b38b80c664d5df32305ac3a4ef70158054;p=deb_libcec.git fixed - log failed acks and other errors in the debug log again --- diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp index 1b14f44..7ad0607 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp @@ -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;