Bluetooth: GATT: Use check_perm to check CCC permission
This moves check_perm code under GAT and make use of it to check if CCC write permission can be attended by the connection security level or if it needs to be increased. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
03b9ce487c
commit
4f3892c0eb
5 changed files with 92 additions and 61 deletions
|
@ -334,6 +334,12 @@ typedef enum __packed {
|
|||
*/
|
||||
int bt_conn_set_security(struct bt_conn *conn, bt_security_t sec);
|
||||
|
||||
/** @brief Get security level for a connection.
|
||||
*
|
||||
* @return Connection security level
|
||||
*/
|
||||
bt_security_t bt_conn_get_security(struct bt_conn *conn);
|
||||
|
||||
static inline int __deprecated bt_conn_security(struct bt_conn *conn,
|
||||
bt_security_t sec)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue