File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -514,8 +514,7 @@ class SecurityManager
514514 * Some or all of bonding information may be stored in memory while in use. This will write
515515 * bonding data to persistent storage. This will have no effect if no persistent storage is enabled.
516516 *
517- * @note You still need to call preserveBondingStateOnReset(true) before reset happens for data to be
518- * loaded when it's read.
517+ * @note This implicitly also calls preserveBondingStateOnReset(true) inside.
519518 *
520519 * @note Depending on the driver used to implement the storage solution used this may be a disruptive
521520 * operation and may cause active connections to drop due to failed processing deadlines.
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ ble_error_t SecurityManager::preserveBondingStateOnReset(bool enable)
4949
5050ble_error_t SecurityManager::writeBondingStateToPersistentStorage ()
5151{
52+ ble_error_t err = impl->preserveBondingStateOnReset (true );
53+ if (err) {
54+ return err;
55+ }
5256 return impl->writeBondingStateToPersistentStorage ();
5357}
5458
You can’t perform that action at this time.
0 commit comments