From 63047ed36e579843329580b27f642b7226fbbf02 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 31 May 2012 22:51:38 +0200 Subject: [PATCH] cec: don't respond with a poll from the broadcast address when receiving in CSLCommandHandler::HandleDeviceVendorId(), but use the primary LA of the client as source instead --- src/lib/implementations/SLCommandHandler.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index f39aef8..46ef3d7 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -133,9 +133,17 @@ bool CSLCommandHandler::HandleDeviceVendorId(const cec_command &command) if (!SLInitialised() && command.initiator == CECDEVICE_TV) { - cec_command response; - cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_FEATURE_ABORT); - return Transmit(response); + CCECBusDevice *destination = m_processor->GetDevice(command.destination); + if (destination && (destination->GetLogicalAddress() == CECDEVICE_BROADCAST || destination->IsHandledByLibCEC())) + { + cec_logical_address initiator = destination->GetLogicalAddress(); + if (initiator == CECDEVICE_BROADCAST) + initiator = m_processor->GetPrimaryDevice()->GetLogicalAddress(); + + cec_command response; + cec_command::Format(response, initiator, command.initiator, CEC_OPCODE_FEATURE_ABORT); + return Transmit(response); + } } return true; } -- 2.34.1