File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
connectivity/FEATURE_BLE/source/generic Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1210,15 +1210,23 @@ ble_error_t SecurityManager::init_database(
12101210 const char *db_path
12111211)
12121212{
1213- tr_info (" Initialize database. Path = %s " , db_path );
1213+ tr_info (" Initialize database." );
12141214 delete _db;
12151215
12161216#if BLE_SECURITY_DATABASE_FILESYSTEM
1217- FILE* db_file = FileSecurityDb::open_db_file (db_path);
1217+ FILE* db_file = nullptr ;
1218+ if (db_path) {
1219+ tr_info (" Using filesystem path = %s" , db_path);
1220+ db_file = FileSecurityDb::open_db_file (db_path);
1221+ }
12181222
12191223 if (db_file) {
12201224 _db = new (std::nothrow) FileSecurityDb (db_file);
12211225 } else
1226+ #else
1227+ if (db_path) {
1228+ tr_error (" Passed in a path for BLE security DB init but BLE_SECURITY_DATABASE_FILESYSTEM is disabled" );
1229+ }
12221230#endif
12231231#if BLE_SECURITY_DATABASE_KVSTORE
12241232 if (KVStoreSecurityDb::open_db ()) {
You can’t perform that action at this time.
0 commit comments