sm: GAP_RANDOM_ADDRESS_TYPE_STATIC does not need periodic updates

This commit is contained in:
Matthias Ringwald 2018-11-20 15:05:23 +01:00
parent 8a655b4bcc
commit 47ba4de1ce

View File

@ -4027,9 +4027,13 @@ int sm_le_device_index(hci_con_handle_t con_handle ){
} }
static int gap_random_address_type_requires_updates(void){ static int gap_random_address_type_requires_updates(void){
if (gap_random_adress_type == GAP_RANDOM_ADDRESS_TYPE_OFF) return 0; switch (gap_random_adress_type){
if (gap_random_adress_type == GAP_RANDOM_ADDRESS_TYPE_OFF) return 0; case GAP_RANDOM_ADDRESS_TYPE_OFF:
return 1; case GAP_RANDOM_ADDRESS_TYPE_STATIC:
return 0;
default:
return 1;
}
} }
static uint8_t own_address_type(void){ static uint8_t own_address_type(void){