From 531c49e31a801dc2a0ce8ae10f97fae7c0c3aac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Rymanowski?= Date: Mon, 10 Feb 2020 14:30:18 +0100 Subject: [PATCH] nimble/l2cap: Fix searching channel by dcid Source CIDs are ordered in the list, but dcid not, therefore when searching by dcid we cannot assume the order. --- nimble/host/src/ble_hs_conn.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/nimble/host/src/ble_hs_conn.c b/nimble/host/src/ble_hs_conn.c index ebed9ce61..fa75a092f 100644 --- a/nimble/host/src/ble_hs_conn.c +++ b/nimble/host/src/ble_hs_conn.c @@ -83,9 +83,6 @@ ble_hs_conn_chan_find_by_dcid(struct ble_hs_conn *conn, uint16_t cid) if (chan->dcid == cid) { return chan; } - if (chan->dcid > cid) { - return NULL; - } } return NULL;