X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2FCECProcessor.cpp;h=4d4abba2ac93cca0fc6c2ee9bebb1cd531fc93ca;hb=38f1fbcc12f5774288b55e3a75df10338f1ed70f;hp=1975421fc9de39c9fdf6dbd491a551ef63d74dd0;hpb=aa4c0d341117a7e3b75b665fbc61f3bb40be5d79;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 1975421..4d4abba 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -207,7 +207,7 @@ void *CCECProcessor::Process(void) { m_libcec->AddLog(CEC_LOG_DEBUG, "processor thread started"); - cec_command command; + cec_command command; command.Clear(); CTimeout activeSourceCheck(ACTIVE_SOURCE_CHECK_INTERVAL); // as long as we're not being stopped and the connection is open @@ -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()); @@ -675,7 +679,7 @@ bool CCECProcessor::RegisterClient(CCECClient *client) // get the settings from the rom if (configuration.bGetSettingsFromROM == 1) { - libcec_configuration config; + libcec_configuration config; config.Clear(); m_communication->GetConfiguration(config); CLockObject lock(m_mutex);