From 9b8871db95d02e87c39c3e6220f71965ec78ca62 Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Wed, 10 Oct 2012 20:35:03 -0300 Subject: [PATCH] gas: Only do the Exchange MTU procedure over LE links The Exchange MTU procedure should only be performed over LE links, we are using the check of the Channel ID used to verify this. --- profiles/gatt/gas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/gatt/gas.c b/profiles/gatt/gas.c index 74ca9ce48..f873121f3 100644 --- a/profiles/gatt/gas.c +++ b/profiles/gatt/gas.c @@ -326,7 +326,8 @@ static void attio_connected_cb(GAttrib *attrib, gpointer user_data) io = g_attrib_get_channel(attrib); if (bt_io_get(io, &gerr, BT_IO_OPT_IMTU, &imtu, - BT_IO_OPT_CID, &cid, BT_IO_OPT_INVALID)) { + BT_IO_OPT_CID, &cid, BT_IO_OPT_INVALID) && + cid == ATT_CID) { gatt_exchange_mtu(gas->attrib, imtu, exchange_mtu_cb, gas); gas->mtu = imtu; DBG("MTU Exchange: Requesting %d", imtu); -- 2.47.3