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

shutdown properly.
This commit is contained in:
Vincent Coubard 2015-11-02 17:04:47 +00:00
parent 847c27cfe9
commit f0d521f04c

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