From: Lars Op den Kamp Date: Sun, 4 Dec 2011 02:16:57 +0000 (+0100) Subject: cec: fix simplink reconnect X-Git-Tag: upstream/2.2.0~1^2~44^2~51 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=797dd7c45722f8faa92a82608b7a646dfc49fe6b;p=deb_libcec.git cec: fix simplink reconnect --- diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 2270d16..d7bfb5b 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -58,9 +58,16 @@ bool CSLCommandHandler::HandleVendorCommand(const cec_command &command) TransmitLGVendorId(command.destination, command.initiator); return true; } - else if (command.parameters.size >= 1 && + else if (command.parameters.size == 2 && command.parameters[0] == 0x04) { + /* enable SL */ + cec_command response; + cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_VENDOR_COMMAND, m_busDevice->GetTransmitTimeout()); + response.PushBack(0x05); + response.PushBack(command.parameters[1]); + m_busDevice->GetProcessor()->Transmit(response); + CCECBusDevice *primary = m_busDevice->GetProcessor()->m_busDevices[m_busDevice->GetProcessor()->GetLogicalAddresses().primary]; if (primary->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || primary->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) {