From 349230321f985104232ed0400a53b2ac8ed64b6a Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 3 Nov 2016 15:16:03 +0200 Subject: [PATCH] Bluetooth: L2CAP: Fix not updating CoC channel state Channel state shall be updated properly otherwise it may cause unexpected errors. Change-Id: Ifd54d6bd3c5b44a40c315fd8a2946b30168aa65f Signed-off-by: Luiz Augusto von Dentz --- subsys/bluetooth/host/l2cap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c index 8b84f112158..0890a4f6c15 100644 --- a/subsys/bluetooth/host/l2cap.c +++ b/subsys/bluetooth/host/l2cap.c @@ -909,6 +909,9 @@ static void le_conn_rsp(struct bt_l2cap *l2cap, uint8_t ident, chan->tx.mtu = mtu; chan->tx.mps = mps; + /* Update state */ + chan->chan.state = BT_L2CAP_CONNECTED; + if (chan->chan.ops && chan->chan.ops->connected) { chan->chan.ops->connected(&chan->chan); }