hci.c (c1f831116149f0bcbc7d2c5b452fbf3889907d28) | hci.c (e938c062fda498bb7e1f80caf014a4004700fa6c) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 5945 unchanged lines hidden (view full) --- 5954 uint8_t mask = 1 << (i & 7); 5955 if ((hci_stack->le_resolving_list_add_entries[offset] & mask) == 0) continue; 5956 hci_stack->le_resolving_list_add_entries[offset] &= ~mask; 5957 bd_addr_t peer_identity_addreses; 5958 int peer_identity_addr_type = (int) BD_ADDR_TYPE_UNKNOWN; 5959 sm_key_t peer_irk; 5960 le_device_db_info(i, &peer_identity_addr_type, peer_identity_addreses, peer_irk); 5961 if (peer_identity_addr_type == BD_ADDR_TYPE_UNKNOWN) continue; | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 5945 unchanged lines hidden (view full) --- 5954 uint8_t mask = 1 << (i & 7); 5955 if ((hci_stack->le_resolving_list_add_entries[offset] & mask) == 0) continue; 5956 hci_stack->le_resolving_list_add_entries[offset] &= ~mask; 5957 bd_addr_t peer_identity_addreses; 5958 int peer_identity_addr_type = (int) BD_ADDR_TYPE_UNKNOWN; 5959 sm_key_t peer_irk; 5960 le_device_db_info(i, &peer_identity_addr_type, peer_identity_addreses, peer_irk); 5961 if (peer_identity_addr_type == BD_ADDR_TYPE_UNKNOWN) continue; |
5962 if (btstack_is_null(peer_irk, 16)) continue; |
|
5962 const uint8_t *local_irk = gap_get_persistent_irk(); 5963 // command uses format specifier 'P' that stores 16-byte value without flip 5964 uint8_t local_irk_flipped[16]; 5965 uint8_t peer_irk_flipped[16]; 5966 reverse_128(local_irk, local_irk_flipped); 5967 reverse_128(peer_irk, peer_irk_flipped); 5968 hci_send_cmd(&hci_le_add_device_to_resolving_list, peer_identity_addr_type, peer_identity_addreses, 5969 peer_irk_flipped, local_irk_flipped); --- 3377 unchanged lines hidden --- | 5963 const uint8_t *local_irk = gap_get_persistent_irk(); 5964 // command uses format specifier 'P' that stores 16-byte value without flip 5965 uint8_t local_irk_flipped[16]; 5966 uint8_t peer_irk_flipped[16]; 5967 reverse_128(local_irk, local_irk_flipped); 5968 reverse_128(peer_irk, peer_irk_flipped); 5969 hci_send_cmd(&hci_le_add_device_to_resolving_list, peer_identity_addr_type, peer_identity_addreses, 5970 peer_irk_flipped, local_irk_flipped); --- 3377 unchanged lines hidden --- |