cec: set the physical address in CCECBusDevice
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index 314313d26156a78815b63e3d650a7967b74797c2..9e3867ef192957fd97caf653d4d1028d3168dedb 100644 (file)
@@ -1,4 +1,3 @@
-#pragma once
 /*
  * This file is part of the libCEC(R) library.
  *
@@ -32,8 +31,8 @@
  */
 
 #include "CECCommandHandler.h"
-#include "CECBusDevice.h"
-#include "CECProcessor.h"
+#include "../CECBusDevice.h"
+#include "../CECProcessor.h"
 
 using namespace CEC;
 
@@ -197,11 +196,8 @@ bool CCECCommandHandler::HandleRoutingChange(const cec_command &command)
   {
     uint16_t iOldAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
     uint16_t iNewAddress = ((uint16_t)command.parameters[2] << 8) | ((uint16_t)command.parameters[3]);
-    CStdString strLog;
-    strLog.Format(">> %i changed physical address from %04x to %04x", command.initiator, iOldAddress, iNewAddress);
-    m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
 
-    m_busDevice->GetProcessor()->AddCommand(command);
+    m_busDevice->SetPhysicalAddress(iNewAddress, iOldAddress);
   }
   return true;
 }