From: Lars Op den Kamp Date: Thu, 31 May 2012 20:51:38 +0000 (+0200) Subject: cec: don't respond with a poll from the broadcast address when receiving in CSLComman... X-Git-Tag: upstream/2.2.0~1^2~23^2^2~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=63047ed36e579843329580b27f642b7226fbbf02;p=deb_libcec.git 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 --- 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; }