Bluetooth: ATT: Fix not returning error
bt_l2cap_send_cb may fail if there are no context available which means that the request would not be sent, also due to the use of custom callback it cannot be queued either so the only option is to return the error and let the application handle it. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
bc7ce86ac5
commit
3ae926c0f1
1 changed files with 2 additions and 2 deletions
|
@ -2902,8 +2902,8 @@ int bt_att_send(struct bt_conn *conn, struct net_buf *buf, bt_conn_tx_cb_t cb,
|
|||
* cannot be used with a custom user_data.
|
||||
*/
|
||||
if (cb) {
|
||||
bt_l2cap_send_cb(conn, BT_L2CAP_CID_ATT, buf, cb, user_data);
|
||||
return 0;
|
||||
return bt_l2cap_send_cb(conn, BT_L2CAP_CID_ATT, buf, cb,
|
||||
user_data);
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue