From: Lars Op den Kamp Date: Mon, 15 Oct 2012 11:02:09 +0000 (+0200) Subject: fixed - don't keep spamming the bus with a vendor command when an active source switc... X-Git-Tag: upstream/2.2.0~1^2~14^2^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cca65ba4e69861ab20aaabb3cd00800d72a97259;p=deb_libcec.git fixed - don't keep spamming the bus with a vendor command when an active source switch is pending for panasonic, but only send it when needed --- diff --git a/src/lib/implementations/VLCommandHandler.cpp b/src/lib/implementations/VLCommandHandler.cpp index 90e8777..1db9fb1 100644 --- a/src/lib/implementations/VLCommandHandler.cpp +++ b/src/lib/implementations/VLCommandHandler.cpp @@ -221,14 +221,14 @@ void CVLCommandHandler::VendorPreActivateSourceHook(void) void CVLCommandHandler::SendVendorCommandCapabilities(const cec_logical_address initiator, const cec_logical_address destination) { - cec_command response; - cec_command::Format(response, initiator, destination, CEC_OPCODE_VENDOR_COMMAND); - uint8_t iResponseData[] = {0x10, 0x02, 0xFF, 0xFF, 0x00, 0x05, 0x05, 0x45, 0x55, 0x5c, 0x58, 0x32}; - response.PushArray(12, iResponseData); - - if (Transmit(response, false, true)) + if (PowerUpEventReceived()) { - if (PowerUpEventReceived()) + cec_command response; + cec_command::Format(response, initiator, destination, CEC_OPCODE_VENDOR_COMMAND); + uint8_t iResponseData[] = {0x10, 0x02, 0xFF, 0xFF, 0x00, 0x05, 0x05, 0x45, 0x55, 0x5c, 0x58, 0x32}; + response.PushArray(12, iResponseData); + + if (Transmit(response, false, true)) { CLockObject lock(m_mutex); m_bCapabilitiesSent = true;