From a528bdce68981d4093fa179d24f749457576c1b5 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 3 Sep 2014 12:39:41 +0300 Subject: [PATCH] emulator/bthost: Fix not matching cid data properly When using bthost_add_l2cap_server the caller expect that both scid and dcid are the same since the callback only take one value. --- emulator/bthost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulator/bthost.c b/emulator/bthost.c index 1394fcad0..1fd9ef99f 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -1226,7 +1226,7 @@ static bool l2cap_conn_req(struct bthost *bthost, struct btconn *conn, cb_data = bthost_find_l2cap_cb_by_psm(bthost, psm); if (cb_data) - rsp.dcid = cpu_to_le16(conn->next_cid++); + rsp.dcid = rsp.scid; else rsp.result = cpu_to_le16(0x0002); /* PSM Not Supported */ -- 2.47.3