cec: signal waiting threads when receiving a feature abort too
[deb_libcec.git] / src / lib / devices / CECBusDevice.cpp
index 51ddfeca68af118baca2ed31bda586c1d0921cee..8a9f963c0a419dda6d233ec12573702280454bf4 100644 (file)
@@ -1038,9 +1038,16 @@ bool CCECBusDevice::IsUnsupportedFeature(cec_opcode opcode)
 
 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);
+  {
+    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);
+  }
+
+  // signal threads that are waiting for a reponse
+  MarkBusy();
+  m_handler->SignalOpcode(cec_command::GetResponseOpcode(opcode));
+  MarkReady();
 }
 
 bool CCECBusDevice::ActivateSource(void)