Re: [PATCH BlueZ v2 1/1] Add provision for terminating an ATT connection

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

 



Hi Smriti Gupta,

On Fri, Jan 20, 2012 at 8:54 AM, Smriti Gupta
<smriti.gupta@xxxxxxxxxxxxxx> wrote:
> In order to terminate any existing ATT connection from the client side
> existing function device_request_disconnect has been updated.
> ---
>  src/device.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/src/device.c b/src/device.c
> index 16855b1..7b5107b 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -781,6 +781,7 @@ static void bonding_request_cancel(struct bonding_req *bonding)
>  void device_request_disconnect(struct btd_device *device, DBusMessage *msg)
>  {
>        DBusConnection *conn = get_dbus_connection();
> +       GIOChannel *io;
>
>        if (device->bonding)
>                bonding_request_cancel(device->bonding);
> @@ -790,6 +791,14 @@ void device_request_disconnect(struct btd_device *device, DBusMessage *msg)
>                browse_request_cancel(device->browse);
>        }
>
> +       if (device->attrib) {
> +               io = g_attrib_get_channel(device->attrib);
> +               if (io) {
> +                       g_io_channel_shutdown(io, FALSE, NULL);
> +                       g_io_channel_unref(io);
> +               }
> +       }
> +
>        if (msg)
>                device->disconnects = g_slist_append(device->disconnects,
>                                                dbus_message_ref(msg));
> --
> 1.7.0.4
>

Ack.

Tested with simple-agent and test-device over BLE.

BR,
Claudio
--
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