Merge branch 'master' of github.com:Pulse-Eight/libcec
[deb_libcec.git] / src / lib / implementations / ANCommandHandler.cpp
index f1e3dd5b1c2da7b7ec7fe50bb96e80ebeaf97cdd..e9674baafb22f84ca8f575d46e407884156cf8a4 100644 (file)
@@ -44,7 +44,7 @@ CANCommandHandler::CANCommandHandler(CCECBusDevice *busDevice) :
 
 bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command)
 {
-  if (command.parameters.size > 0)
+  if (m_processor->IsStarted() && command.parameters.size > 0)
   {
     cec_keypress key;
     key.duration = CEC_BUTTON_TIMEOUT;
@@ -75,7 +75,7 @@ bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command)
 bool CANCommandHandler::HandleCommand(const cec_command &command)
 {
   bool bHandled(false);
-  if (command.destination == m_busDevice->GetMyLogicalAddress())
+  if (m_busDevice->MyLogicalAddressContains(command.destination))
   {
     switch(command.opcode)
     {