Add initialization check before querying SD bond table
This commit is contained in:
parent
33db258c8d
commit
1e4d6f20fc
|
@ -273,6 +273,9 @@ dm_handler(dm_handle_t const *p_handle, dm_event_t const *p_event, ret_code_t ev
|
||||||
ble_error_t
|
ble_error_t
|
||||||
btle_createWhitelistFromBondTable(ble_gap_whitelist_t *p_whitelist)
|
btle_createWhitelistFromBondTable(ble_gap_whitelist_t *p_whitelist)
|
||||||
{
|
{
|
||||||
|
if (!btle_hasInitializedSecurity()) {
|
||||||
|
return BLE_ERROR_INITIALIZATION_INCOMPLETE;
|
||||||
|
}
|
||||||
ret_code_t err = dm_whitelist_create(&applicationInstance, p_whitelist);
|
ret_code_t err = dm_whitelist_create(&applicationInstance, p_whitelist);
|
||||||
if (err == NRF_SUCCESS) {
|
if (err == NRF_SUCCESS) {
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
|
|
Loading…
Reference in New Issue