From: Lars Op den Kamp Date: Tue, 3 Jan 2012 16:18:03 +0000 (+0100) Subject: cec: get the physical address of the target device before without holding a lock... X-Git-Tag: upstream/2.2.0~1^2~42^2~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5d0c1164b53973b5866892dc54b4ac00911000c6;p=deb_libcec.git cec: get the physical address of the target device before without holding a lock in CCECProcessor::SetHDMIPort() --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index e0a32a8..5071ec6 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -510,7 +510,11 @@ bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort, uint16_t iPhysicalAddress(0); if (iBaseDevice > CECDEVICE_TV) + { + lock.Leave(); iPhysicalAddress = m_busDevices[iBaseDevice]->GetPhysicalAddress(); + lock.Lock(); + } if (iPhysicalAddress < 0xffff) {