mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-12 12:10:03 +00:00
BLE Host - Don't crash if no store package.
Prior to this change: the host asserted that IRK restoration succeeds at sync time. A common reason for failure was the lack of any host store package in the build. After change: If IRK restoration at startup fails for any reason, a message is logged and the app continues running. X-Original-Commit: 3e6ff4de76f6cc486ad7c7a545c3f8b4aac01e82
This commit is contained in:
@@ -313,7 +313,10 @@ ble_hs_sync(void)
|
||||
|
||||
if (rc == 0) {
|
||||
rc = ble_hs_misc_restore_irks();
|
||||
assert(rc == 0);
|
||||
if (rc != 0) {
|
||||
BLE_HS_LOG(INFO, "Failed to restore IRKs from store; status=%d",
|
||||
rc);
|
||||
}
|
||||
|
||||
if (ble_hs_cfg.sync_cb != NULL) {
|
||||
ble_hs_cfg.sync_cb();
|
||||
|
||||
Reference in New Issue
Block a user