No changes
Fork of nRF51822 by
Diff: btle/btle_security.cpp
- Revision:
- 137:aafab7b0a8bd
- Parent:
- 136:9bb49953de6a
- Child:
- 138:750eca573e18
--- a/btle/btle_security.cpp Fri May 08 15:33:56 2015 +0100 +++ b/btle/btle_security.cpp Fri May 08 15:33:56 2015 +0100 @@ -74,8 +74,18 @@ btle_deleteAllStoredDevices(void) { ret_code_t rc; + if ((rc = dm_device_delete_all(&applicationInstance)) == NRF_SUCCESS) { + return BLE_ERROR_NONE; + } - return BLE_ERROR_NONE; + switch (rc) { + case NRF_ERROR_INVALID_STATE: + return BLE_ERROR_INVALID_STATE; + case NRF_ERROR_NO_MEM: + return BLE_ERROR_NO_MEM; + default: + return BLE_ERROR_UNSPECIFIED; + } } ret_code_t