Bluetooth: L2CAP: Log an error if data cannot be sent
This add an error to the output which helps detects failures in case debug is not enabled. Change-Id: I2f4ed357ccf288c15b231d637bf1986af9ecbf37 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
8cf5a5080c
commit
c22f551940
1 changed files with 8 additions and 1 deletions
|
@ -1277,6 +1277,8 @@ static int l2cap_chan_le_send_sdu(struct bt_l2cap_chan *chan,
|
|||
|
||||
int bt_l2cap_chan_send(struct bt_l2cap_chan *chan, struct net_buf *buf)
|
||||
{
|
||||
int err;
|
||||
|
||||
BT_DBG("chan %p buf %p len %u", chan, buf, buf->len);
|
||||
|
||||
if (!buf) {
|
||||
|
@ -1288,6 +1290,11 @@ int bt_l2cap_chan_send(struct bt_l2cap_chan *chan, struct net_buf *buf)
|
|||
}
|
||||
|
||||
/* TODO: Check conn/address type when BR/EDR is introduced */
|
||||
return l2cap_chan_le_send_sdu(chan, buf);
|
||||
err = l2cap_chan_le_send_sdu(chan, buf);
|
||||
if (err < 0) {
|
||||
BT_ERR("failed to send message %d", err);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif /* CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue