From 6a44a69acead3e0d5a5bf5879f7ae312d419e022 Mon Sep 17 00:00:00 2001 From: Grzegorz Kolodziejczyk Date: Wed, 29 Apr 2015 11:15:52 +0200 Subject: [PATCH] android/gatt: Send notify mtu change for BR/EDR success conn This patch fixes sending mtu change notification for BR/EDR gatt connections. For unsuccessful connection, notify mtu change shouldn't be sent. This avoid sending bogus mtu values as notify mtu change. --- android/gatt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/gatt.c b/android/gatt.c index 18d55b06e..625b7dfbf 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -1652,7 +1652,7 @@ reply: &data); /* For BR/EDR notify about MTU since it is not negotiable*/ - if (cid != ATT_CID) + if (cid != ATT_CID && status == GATT_SUCCESS) queue_foreach(app_connections, notify_mtu_change, dev); device_unref(dev); -- 2.47.3