Clone of the nRF51822 repository from github The correct home is https://github.com/lancaster-university/nRF51822

Dependencies:   nrf51-sdk

Dependents:   microbit-dal microbit-ble-open microbit-dal-eddystone microbit-dal-ble-accelerometer-example ... more

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