Skip to content

Commit 020c5b4

Browse files
committed
BLE - Disabling SecurityManager connection handling when security disabled.
1 parent af09f7b commit 020c5b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

features/FEATURE_BLE/source/generic/GenericSecurityManager.tpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_connected_(
11051105
const BLEProtocol::AddressBytes_t local_address,
11061106
const ::Gap::ConnectionParams_t *connection_params
11071107
) {
1108+
#if BLE_FEATURE_SECURITY
11081109
MBED_ASSERT(_db);
11091110
ControlBlock_t *cb = acquire_control_block(connection);
11101111
if (!cb) {
@@ -1136,14 +1137,16 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_connected_(
11361137
cb->db_entry
11371138
);
11381139
}
1139-
#endif
1140+
#endif // BLE_FEATURE_SIGNING
1141+
#endif // BLE_FEATURE_SECURITY
11401142
}
11411143

11421144
template<template<class> class TPalSecurityManager, template<class> class SigningMonitor>
11431145
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_disconnected_(
11441146
connection_handle_t connection,
11451147
::Gap::DisconnectionReason_t reason
11461148
) {
1149+
#if BLE_FEATURE_SECURITY
11471150
MBED_ASSERT(_db);
11481151
ControlBlock_t *cb = get_control_block(connection);
11491152
if (!cb) {
@@ -1155,6 +1158,7 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_disconnecte
11551158

11561159
_db->close_entry(cb->db_entry);
11571160
release_control_block(cb);
1161+
#endif // BLE_FEATURE_SECURITY
11581162
}
11591163

11601164
template<template<class> class TPalSecurityManager, template<class> class SigningMonitor>

0 commit comments

Comments
 (0)