From cbc1720d4f13b6d8a25749cdcb4154d4ef08f38b Mon Sep 17 00:00:00 2001 From: Marcin Kraglak Date: Fri, 10 Jan 2014 10:18:18 +0100 Subject: [PATCH] emulator/bthost: Add rfcomm_mcc_recv stub It will handle mcc frames in bthost. --- emulator/bthost.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/emulator/bthost.c b/emulator/bthost.c index 83a1f4fdf..5aab60a7f 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -1521,10 +1521,29 @@ static void rfcomm_dm_recv(struct bthost *bthost, struct btconn *conn, { } +static void rfcomm_mcc_recv(struct bthost *bthost, struct btconn *conn, + struct l2conn *l2conn, const void *data, uint16_t len) +{ +} + static void rfcomm_uih_recv(struct bthost *bthost, struct btconn *conn, struct l2conn *l2conn, const void *data, uint16_t len) { + const struct rfcomm_cmd *hdr = data; + const void *p; + uint8_t ea; + + ea = RFCOMM_TEST_EA(hdr->length) ? true : false; + + if (!RFCOMM_GET_DLCI(hdr->address)) { + if (ea) + p = data + sizeof(struct rfcomm_hdr); + else + p = data + sizeof(struct rfcomm_hdr) + sizeof(uint8_t); + + rfcomm_mcc_recv(bthost, conn, l2conn, p, p - data); + } } static void process_rfcomm(struct bthost *bthost, struct btconn *conn, -- 2.47.3