feat(ble): Make it possible to use BT_GATT_AUTO_SEC_REQ
* Only upgrade security of new connections if BT_GATT_AUTO_SEC_REQ is not enabled.
This commit is contained in:
parent
744f70c80c
commit
329d6474ee
1 changed files with 2 additions and 0 deletions
|
@ -445,9 +445,11 @@ static void connected(struct bt_conn *conn, uint8_t err) {
|
|||
|
||||
LOG_DBG("Connected %s", addr);
|
||||
|
||||
#if !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ)
|
||||
if (bt_conn_set_security(conn, BT_SECURITY_L2)) {
|
||||
LOG_ERR("Failed to set security");
|
||||
}
|
||||
#endif // !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ)
|
||||
|
||||
update_advertising();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue