cec: fixed - set the physical address of each device controlled by a CCECClient if...
[deb_libcec.git] / src / lib / CECProcessor.cpp
index 1975421fc9de39c9fdf6dbd491a551ef63d74dd0..324c5580e7439d8c21c62c108124824f2f0894d0 100644 (file)
@@ -666,6 +666,10 @@ bool CCECProcessor::RegisterClient(CCECClient *client)
   m_busDevices->GetByLogicalAddresses(devices, configuration.logicalAddresses);
   for (CECDEVICEVEC::const_iterator it = devices.begin(); it != devices.end(); it++)
   {
+               // set the physical address of the device at this LA
+    if (CLibCEC::IsValidPhysicalAddress(configuration.iPhysicalAddress))
+      (*it)->SetPhysicalAddress(configuration.iPhysicalAddress);
+
     // replace a previous client
     CLockObject lock(m_mutex);
     m_clients.erase((*it)->GetLogicalAddress());