overwrite stored names & link keys if no place remained

This commit is contained in:
mila@ringwald.ch 2011-11-15 13:37:11 +00:00
parent 32046991c1
commit 7777253151

View File

@ -105,7 +105,7 @@ static void put_link_key(bd_addr_t *bd_addr, link_key_t *link_key){
db_mem_device_link_key_t * newItem = (db_mem_device_link_key_t*) btstack_memory_db_mem_device_link_key_get();
if (!newItem){
return;//newItem = (db_mem_device_link_key_t*)linked_list_get_last_item(&db_mem_link_keys);
newItem = (db_mem_device_link_key_t*)linked_list_get_last_item(&db_mem_link_keys);
}
memcpy(newItem->device.bd_addr, bd_addr, sizeof(bd_addr_t));