cec: fix simplink reconnect
authorLars Op den Kamp <lars@opdenkamp.eu>
Sun, 4 Dec 2011 02:16:57 +0000 (03:16 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sun, 4 Dec 2011 02:28:35 +0000 (03:28 +0100)
src/lib/implementations/SLCommandHandler.cpp

index 2270d169161ca77a2993b717d456ef55d3203bcf..d7bfb5bab2f043f4a3f20c14f7428bbdb9dee9fc 100644 (file)
@@ -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)
     {