From: Lars Op den Kamp Date: Mon, 6 Feb 2012 10:15:22 +0000 (+0100) Subject: cec: keep the mutex locked when calling ReplaceHandlers() in CCECProcessor X-Git-Tag: upstream/2.2.0~1^2~36^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ded7e7cea9571381bef47bb2f2fb0e5266671914;p=deb_libcec.git cec: keep the mutex locked when calling ReplaceHandlers() in CCECProcessor --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index c63bc57..e45eda0 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -383,6 +383,7 @@ bool CCECProcessor::FindLogicalAddresses(void) void CCECProcessor::ReplaceHandlers(void) { + CLockObject lock(m_mutex); if (!IsInitialised()) return; for (uint8_t iPtr = 0; iPtr <= CECDEVICE_PLAYBACKDEVICE3; iPtr++) @@ -636,6 +637,7 @@ bool CCECProcessor::SetPhysicalAddress(uint16_t iPhysicalAddress, bool bSendUpda bool bSendActiveView(false); bool bReturn(false); cec_logical_addresses sendUpdatesTo; + sendUpdatesTo.Clear(); { CLockObject lock(m_mutex);