cec: don't replace handlers when not initialised, or the primary device's logical...
[deb_libcec.git] / src / lib / devices / CECBusDevice.cpp
index be9e8875f614164be47b0585479f2ed6d549167b..3577518a95305bb7fa0574968d95e696841f3465 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -834,4 +834,16 @@ bool CCECBusDevice::ActivateSource(void)
   return m_handler->ActivateSource();
 }
 
+void CCECBusDevice::HandlePoll(cec_logical_address destination)
+{
+  CLockObject lock(m_handlerMutex);
+  m_handler->HandlePoll(m_iLogicalAddress, destination);
+}
+
+bool CCECBusDevice::HandleReceiveFailed(void)
+{
+  CLockObject lock(m_handlerMutex);
+  return m_handler->HandleReceiveFailed();
+}
+
 //@}