Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
Diff: btle/btle_security.cpp
- Revision:
- 143:9d73e7f9f2bf
- Parent:
- 142:b6fe43a5c18f
- Child:
- 144:9d8fce4b4d5a
diff -r b6fe43a5c18f -r 9d73e7f9f2bf btle/btle_security.cpp --- a/btle/btle_security.cpp Fri May 08 15:33:57 2015 +0100 +++ b/btle/btle_security.cpp Fri May 08 15:33:57 2015 +0100 @@ -56,18 +56,18 @@ }; ret_code_t rc; - if ((rc = dm_register(&applicationInstance, &dm_param)) == NRF_SUCCESS) { - return BLE_ERROR_NONE; + if ((rc = dm_register(&applicationInstance, &dm_param)) != NRF_SUCCESS) { + 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; + } } - 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; - } + return BLE_ERROR_NONE; } ble_error_t