From 25997c2a2a195d6e675585df28daacaf01a90762 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Mon, 11 Dec 2023 10:27:49 +0900 Subject: [PATCH] shared/att: Fix mtu not updated issue Reproduction steps: 1. gatt connected 2. request to the remote with mtu 517 3. when getting mtu, 517 returned 4. mtu 512 changed received from the remote 5. when getting mtu, 517 returned. (Should be 512) Change-Id: Ic2c6b19690d7da7572762083ab9577cb3b9e0e97 Signed-off-by: Wootak Jung --- src/shared/att.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/att.c b/src/shared/att.c index 80a03f4..f75de1c 100755 --- a/src/shared/att.c +++ b/src/shared/att.c @@ -1439,7 +1439,11 @@ bool bt_att_set_mtu(struct bt_att *att, uint16_t mtu) chan->mtu = mtu; chan->buf = buf; +#ifdef TIZEN_FEATURE_BLUEZ_MODIFY + if (chan->mtu != att->mtu) { +#else if (chan->mtu > att->mtu) { +#endif att->mtu = chan->mtu; queue_foreach(att->exchange_list, exchange_handler, INT_TO_PTR(att->mtu)); -- 2.7.4