cec: replace the handler directly after getting the vendor id of a device when regist...
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index f99d4c078556d4ce5973fce0fa46255400db42f3..03165e9c2cf91ec613a4def5b4cd901f2dbcff5e 100644 (file)
@@ -73,9 +73,7 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command)
 
   int iHandled(CEC_ABORT_REASON_UNRECOGNIZED_OPCODE);
 
-  CCECClient *client = m_busDevice->GetClient();
-  if (client)
-    client->AddCommand(command);
+  LIB_CEC->AddCommand(command);
 
   switch(command.opcode)
   {
@@ -1141,7 +1139,7 @@ bool CCECCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = f
     {
       LIB_CEC->AddLog(CEC_LOG_DEBUG, "failed to make '%s' the active source. will retry later", m_busDevice->GetLogicalAddressName());
       CLockObject lock(m_mutex);
-      m_iActiveSourcePending = GetTimeMs() + CEC_ACTIVE_SOURCE_SWITCH_RETRY_TIME_MS;
+      m_iActiveSourcePending = GetTimeMs() + (int64_t)CEC_ACTIVE_SOURCE_SWITCH_RETRY_TIME_MS;
       return false;
     }