Ensure that the initialization flags is set to false if the BLE stack is

shutdown properly.
master
Vincent Coubard 2015-11-02 17:04:47 +00:00
parent 847c27cfe9
commit f0d521f04c
1 changed files with 6 additions and 1 deletions

View File

@ -104,7 +104,12 @@ ble_error_t nRF5xn::shutdown(void)
return BLE_ERROR_INITIALIZATION_INCOMPLETE;
}
return (softdevice_handler_sd_disable() == NRF_SUCCESS) ? BLE_ERROR_NONE : BLE_STACK_BUSY;
if(softdevice_handler_sd_disable() != NRF_SUCCESS) {
return BLE_STACK_BUSY;
}
initialized = false;
return BLE_ERROR_NONE;
}
void