Re: [PATCH 4/4] android/gatt: Fix autoconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mariusz,

On Thursday 30 of April 2015 13:26:18 Mariusz Skamra wrote:
> 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.
> ---
>  android/gatt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index 4da959f..72a27ab 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);

This patch is now applied. Thanks.

-- 
BR
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux