X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FPulse-Eight%2FUSBCECAdapterMessageQueue.cpp;h=880ad1c6438964ae9a825369be76114304e8da0c;hb=4f5046734389cc554448da5cee93970f3091348b;hp=1b14f445f30e9bfc43afbef5304296d3277cb619;hpb=95587b956c69ead0b46d301f5ca70e977890c3fd;p=deb_libcec.git diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp index 1b14f44..880ad1c 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp @@ -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. @@ -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;