Skip to content

Commit

Permalink
BLE: Initialize the pal in GenericSecurityManager
Browse files Browse the repository at this point in the history
  • Loading branch information
pan- committed Mar 23, 2018
1 parent e25d5c9 commit 0a710e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ tags

# Visual Studio Code
.vscode/

features/FEATURE_BLE/targets/TARGET_CORDIO/stack_backup/
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ ble_error_t GenericSecurityManager::init(
const Passkey_t passkey,
bool signing
) {
ble_error_t err = _pal.initialize();
if (err) {
return err;
}

_db.restore();
_pal.set_io_capability((io_capability_t::type) iocaps);

Expand Down Expand Up @@ -73,6 +78,7 @@ ble_error_t GenericSecurityManager::init(

ble_error_t GenericSecurityManager::reset(void) {
_db.sync();
_pal.reset();
SecurityManager::reset();

return BLE_ERROR_NONE;
Expand Down

0 comments on commit 0a710e5

Please sign in to comment.