X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.cpp;h=f340d54a96b8412799b0f3da993395bedc25114e;hb=33dd87a962743d205ade8dc83693f23e94e36f03;hp=cba201b678c86424271236753d5fec67a9ae943c;hpb=c3ce6b477f21ac72bebd036074bfad3b966f6154;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index cba201b..f340d54 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -1012,8 +1012,9 @@ bool CCECBusDevice::TransmitKeyRelease(bool bWait /* = true */) return bReturn; } -bool CCECBusDevice::IsUnsupportedFeature(cec_opcode opcode) const +bool CCECBusDevice::IsUnsupportedFeature(cec_opcode opcode) { + CLockObject lock(m_mutex); bool bUnsupported = (m_unsupportedFeatures.find(opcode) != m_unsupportedFeatures.end()); if (bUnsupported) CLibCEC::AddLog(CEC_LOG_NOTICE, "'%s' is marked as unsupported feature for device '%s'", ToString(opcode), GetLogicalAddressName()); @@ -1022,6 +1023,7 @@ bool CCECBusDevice::IsUnsupportedFeature(cec_opcode opcode) const void CCECBusDevice::SetUnsupportedFeature(cec_opcode opcode) { + CLockObject lock(m_mutex); CLibCEC::AddLog(CEC_LOG_DEBUG, "marking opcode '%s' as unsupported feature for device '%s'", ToString(opcode), GetLogicalAddressName()); m_unsupportedFeatures.insert(opcode); }