repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c183fa4
)
cec: use CTryLockObject when trying to replace handlers in CCECBusDevice
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 9 Feb 2012 11:59:54 +0000
(12:59 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 9 Feb 2012 11:59:54 +0000
(12:59 +0100)
src/lib/devices/CECBusDevice.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/devices/CECBusDevice.cpp
b/src/lib/devices/CECBusDevice.cpp
index 2aa29c1d31c2f09818a4833ab100280f2c71ece5..fc85d38f6f0c89854e1addc495156babbb9ff730 100644
(file)
--- a/
src/lib/devices/CECBusDevice.cpp
+++ b/
src/lib/devices/CECBusDevice.cpp
@@
-582,7
+582,10
@@
void CCECBusDevice::SetPowerStatus(const cec_power_status powerStatus)
bool CCECBusDevice::ReplaceHandler(bool bActivateSource /* = true */)
{
- CLockObject lock(m_mutex);
+ CTryLockObject lock(m_mutex);
+ if (!lock.IsLocked())
+ return false;
+
CLockObject handlerLock(m_handlerMutex);
if (m_vendor != m_handler->GetVendorId())