repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: don't try to match a device with PA 0xFFFF. don't change the power status of...
[deb_libcec.git]
/
src
/
lib
/
CECProcessor.cpp
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index efe038f1498eb17f433fa0c7f8191673411dc031..8217e4edf93c340a4da94d7aa54d9947901cac03 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-542,6
+542,10
@@
bool CCECProcessor::SetActiveSource(uint16_t iStreamPath)
device->SetActiveSource();
bReturn = true;
}
device->SetActiveSource();
bReturn = true;
}
+ else
+ {
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "device with PA '%04x' not found", iStreamPath);
+ }
return bReturn;
}
return bReturn;
}
@@
-812,20
+816,17
@@
uint8_t CCECProcessor::MuteAudio(bool bSendRelease /* = true */)
CCECBusDevice *CCECProcessor::GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress, bool bSuppressUpdate /* = true */)
{
CCECBusDevice *CCECProcessor::GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress, bool bSuppressUpdate /* = true */)
{
- if (m_configuration.logicalAddresses.primary != CECDEVICE_UNKNOWN)
- {
- if (m_busDevices[m_configuration.logicalAddresses.primary]->GetPhysicalAddress() == iPhysicalAddress)
- return m_busDevices[m_configuration.logicalAddresses.primary];
- }
+ CCECBusDevice *device(NULL);
- CCECBusDevice *device = NULL;
- for (unsigned int iPtr = 0; iPtr < 16; iPtr++)
+ // invalid PA
+ if (iPhysicalAddress == 0xFFFF)
+ return device;
+
+ // check each device until we found a match
+ for (unsigned int iPtr = 0; !device && iPtr < 16; iPtr++)
{
if (m_busDevices[iPtr]->GetPhysicalAddress(bSuppressUpdate) == iPhysicalAddress)
{
if (m_busDevices[iPtr]->GetPhysicalAddress(bSuppressUpdate) == iPhysicalAddress)
- {
device = m_busDevices[iPtr];
device = m_busDevices[iPtr];
- break;
- }
}
return device;
}
return device;