Bluetooth: Remove broken check for existing rx CID

This check was trying to optimize the CID allocation, but it adds
little value and was actually broken because of the wrong CID passed
to the lookup function.

Change-Id: I793be0c5eeccb931cea4a5430991d4e692926da6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-11-02 11:17:11 +02:00 committed by Anas Nashif
commit c20b68a221

View file

@ -120,12 +120,6 @@ static void l2cap_chan_alloc_cid(struct bt_conn *conn,
return;
}
/* Try matching dcid first */
if (!bt_l2cap_lookup_rx_cid(conn, chan->rx.cid)) {
chan->rx.cid = chan->tx.cid;
return;
}
/* TODO: Check conn type before assigning cid */
for (cid = L2CAP_LE_DYN_CID_START; cid <= L2CAP_LE_DYN_CID_END; cid++) {
if (!bt_l2cap_lookup_rx_cid(conn, cid)) {