repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rpi: handle VC_CEC_LOGICAL_ADDR_LOST in the rpi communication class itself, don't...
[deb_libcec.git]
/
src
/
lib
/
CECProcessor.cpp
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index b4445f42f921881edb6361d57f45a7498c62136f..1eb272aa7197ba51db4c851b3cad825a0b706f36 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-887,10
+887,18
@@
void CCECProcessor::SwitchMonitoring(bool bSwitchTo)
UnregisterClients();
}
UnregisterClients();
}
-void CCECProcessor::HandleLogicalAddressLost(cec_logical_address
a
ddress)
+void CCECProcessor::HandleLogicalAddressLost(cec_logical_address
oldAddress, cec_logical_address newA
ddress)
{
{
- m_libcec->AddLog(CEC_LOG_NOTICE, "logical address %x was taken by another device,
re-registering the client"
);
- CCECClient* client = GetClient(
a
ddress);
+ m_libcec->AddLog(CEC_LOG_NOTICE, "logical address %x was taken by another device,
changed to %x", oldAddress, newAddress
);
+ CCECClient* client = GetClient(
oldA
ddress);
if (client)
if (client)
- RegisterClient(client);
+ {
+ if (newAddress == CECDEVICE_UNKNOWN)
+ UnregisterClient(client);
+ else
+ {
+ client->m_configuration.logicalAddresses.Unset(oldAddress);
+ client->m_configuration.logicalAddresses.Set(newAddress);
+ }
+ }
}
}