From d858444eb504d1d714518c8581c532b977cb70ba Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 2 Nov 2015 08:44:55 +0200 Subject: [PATCH] Bluetooth: l2cap: Fix error code for SCID in use If we receive a connect request for an SCID that's already allocated we should return the appropriate "SCID in use" error for it instead of "No resources". Change-Id: I1c1e1bba7059c8a37a8cc01c4bb2f3fbd7aab67d Signed-off-by: Johan Hedberg --- net/bluetooth/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index fefa50927e0..8e89f601f6f 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -395,7 +395,7 @@ static void le_conn_req(struct bt_l2cap *l2cap, uint8_t ident, chan = bt_l2cap_lookup_tx_cid(conn, scid); if (chan) { rsp->dcid = req->scid; - rsp->result = BT_L2CAP_ERR_NO_RESOURCES; + rsp->result = BT_L2CAP_ERR_SCID_IN_USE; goto rsp; }