mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-10 15:44:32 +00:00
le_device_db_tlv: return null addr and BD_ADDR_TYPE_UNKNOWN if device entry does not exist
This commit is contained in:
parent
46d9fae3db
commit
a9c8940efe
@ -280,8 +280,7 @@ void le_device_db_info(int index, int * addr_type, bd_addr_t addr, sm_key_t irk)
|
||||
entry.addr_type = BD_ADDR_TYPE_UNKNOWN;
|
||||
|
||||
// fetch entry
|
||||
int ok = le_device_db_tlv_fetch(index, &entry);
|
||||
if (!ok) return;
|
||||
le_device_db_tlv_fetch(index, &entry);
|
||||
|
||||
if (addr_type) *addr_type = entry.addr_type;
|
||||
if (addr) memcpy(addr, entry.addr, 6);
|
||||
|
Loading…
x
Reference in New Issue
Block a user