diff options
author | Mariusz Skamra <mariusz.skamra@gmail.com> | 2015-04-30 13:26:18 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-05-08 14:37:16 +0200 |
commit | b84eff92dfcb1feb1493ecb6fe48f9a7ff548934 (patch) | |
tree | 4170793a98c93ed9b886feb93f05dfe27d022bf7 /android/gatt.c | |
parent | 96db78604252eeb17614b9982ced95fd66c6c6fc (diff) | |
download | bluez-b84eff92dfcb1feb1493ecb6fe48f9a7ff548934.tar.gz |
android/gatt: Fix autoconnect
This patch fixes autoconnect issue, however there is also race hazard in
Android Gatt framework. If app uses autoconnect while connecting,
direct flag is set to false. Then bt_gatt_add_autoconnect should be called
to add this app's id to autoconnect_apps queue.
Diffstat (limited to 'android/gatt.c')
-rw-r--r-- | android/gatt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/android/gatt.c b/android/gatt.c index 4da959fea..72a27ab78 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -1972,6 +1972,7 @@ static bool trigger_connection(struct app_connection *conn, bool direct) if (direct) return connect_le(conn->device) == 0; + bt_gatt_add_autoconnect(conn->app->id, &conn->device->bdaddr); return auto_connect_le(conn->device); case DEVICE_CONNECTED: notify_app_connect_status(conn, GATT_SUCCESS); |