Message ID | 20220217233902.3093404-2-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [BlueZ,1/2] main.conf: Introduce MaxControllers | expand |
diff --git a/src/adapter.c b/src/adapter.c index 1551011a8..97ce26f8e 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -9807,6 +9807,16 @@ static void read_info_complete(uint8_t status, uint16_t length, goto failed; } } else { + struct btd_adapter *tmp; + + tmp = adapter_find(&rp->bdaddr); + if (tmp) { + btd_error(adapter->dev_id, + "Bluetooth address for index %u match index %u", + adapter->dev_id, tmp->dev_id); + goto failed; + } + bacpy(&adapter->bdaddr, &rp->bdaddr); if (!(adapter->supported_settings & MGMT_SETTING_LE)) adapter->bdaddr_type = BDADDR_BREDR;
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> The bdaddr of an adapter is used for its unique storage path so having multiple adapters with the same address would likely cause problems with its storage as they would be shared. --- src/adapter.c | 10 ++++++++++ 1 file changed, 10 insertions(+)