From 99f1d66e089d70a3cd460292eb521686181af0e6 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 8 Mar 2012 20:21:42 +0100 Subject: [PATCH] cec: only wait for multiple 'command accepted' response when sending a transmit command, and only to 1 in other cases. bugzid: 543 --- src/lib/adapter/USBCECAdapterCommunication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/adapter/USBCECAdapterCommunication.cpp b/src/lib/adapter/USBCECAdapterCommunication.cpp index 030d643..20f480b 100644 --- a/src/lib/adapter/USBCECAdapterCommunication.cpp +++ b/src/lib/adapter/USBCECAdapterCommunication.cpp @@ -823,7 +823,7 @@ bool CUSBCECAdapterCommunication::WaitForAck(CCECAdapterMessage &message) { bool bError(false); bool bTransmitSucceeded(false); - uint8_t iPacketsLeft(message.Size() / 4); + uint8_t iPacketsLeft(message.isTransmission ? message.Size() / 4 : 1); int64_t iNow = GetTimeMs(); int64_t iTargetTime = iNow + (message.transmit_timeout <= 5 ? CEC_DEFAULT_TRANSMIT_WAIT : message.transmit_timeout); -- 2.34.1