Bluetooth: ATT: Avoid warning when no ATT request is pending
Avoid warning in att_handle_rsp, only call this when there is a pending ATT request. This avoids a warning happens when elevating security fails but higher security had not been requested by an ATT request. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no> squash! Bluetooth: ATT: Remove warning when no ATT process pending
This commit is contained in:
parent
53435fdd8f
commit
42b4719947
1 changed files with 5 additions and 1 deletions
|
@ -2673,7 +2673,11 @@ static void bt_att_encrypt_change(struct bt_l2cap_chan *chan,
|
|||
* outstanding request about security failure.
|
||||
*/
|
||||
if (hci_status) {
|
||||
att_handle_rsp(att_chan, NULL, 0, BT_ATT_ERR_AUTHENTICATION);
|
||||
if (att_chan->req) {
|
||||
att_handle_rsp(att_chan, NULL, 0,
|
||||
BT_ATT_ERR_AUTHENTICATION);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue