Skip to content

Commit cd9f12a

Browse files
return error codes
1 parent ace491d commit cd9f12a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,8 @@ ble_error_t GenericSecurityManager::init_database(
788788
}
789789

790790
ble_error_t GenericSecurityManager::init_resolving_list() {
791+
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
792+
791793
/* match the resolving list to the currently stored set of IRKs */
792794
uint8_t resolving_list_capacity = _pal.read_resolving_list_capacity();
793795
SecurityEntryIdentity_t* identity_list_p =
@@ -803,7 +805,11 @@ ble_error_t GenericSecurityManager::init_resolving_list() {
803805
mbed::callback(this, &GenericSecurityManager::on_identity_list_retrieved),
804806
identity_list
805807
);
808+
} else {
809+
return BLE_ERROR_NO_MEM;
806810
}
811+
812+
return BLE_ERROR_NONE;
807813
}
808814

809815
ble_error_t GenericSecurityManager::init_signing() {

0 commit comments

Comments
 (0)