From 4d6f5ac7a660c0b450bff491a16f8bc23944f0ea Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Wed, 11 Jan 2012 01:52:37 +0100 Subject: [PATCH] cec: don't transmit physical addresses while holding a lock in CCECProcessor --- src/lib/CECProcessor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 02c1e96..a429216 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -607,6 +607,7 @@ bool CCECProcessor::SetPhysicalAddress(uint16_t iPhysicalAddress, bool bSendUpda { bool bSendActiveView(false); bool bReturn(false); + cec_logical_addresses sendUpdatesTo; { CLockObject lock(&m_mutex); @@ -620,7 +621,7 @@ bool CCECProcessor::SetPhysicalAddress(uint16_t iPhysicalAddress, bool bSendUpda m_busDevices[iPtr]->SetInactiveSource(); m_busDevices[iPtr]->SetPhysicalAddress(iPhysicalAddress); if (bSendUpdate) - m_busDevices[iPtr]->TransmitPhysicalAddress(); + sendUpdatesTo.Set((cec_logical_address)iPtr); } bSendActiveView = bWasActiveSource && bSendUpdate; @@ -628,6 +629,10 @@ bool CCECProcessor::SetPhysicalAddress(uint16_t iPhysicalAddress, bool bSendUpda } } + for (uint8_t iPtr = 0; iPtr < 15; iPtr++) + if (sendUpdatesTo[iPtr]) + m_busDevices[iPtr]->TransmitPhysicalAddress(); + if (bSendActiveView) SetActiveView(); -- 2.34.1