* [PATCH BlueZ v2 0/1] Add provision for terminating an ATT connection @ 2012-01-20 11:54 Smriti Gupta 2012-01-20 11:54 ` [PATCH BlueZ v2 1/1] " Smriti Gupta 0 siblings, 1 reply; 4+ messages in thread From: Smriti Gupta @ 2012-01-20 11:54 UTC (permalink / raw) To: linux-bluetooth; +Cc: naresh.gupta, smritigupta2008, Smriti Gupta This patch is updated version after incorporating Johan's comments. In order to terminate any existing ATT connection from the client side existing function device_request_disconnect has been updated. Smriti Gupta (1): Add provision for terminating an ATT connection src/device.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH BlueZ v2 1/1] Add provision for terminating an ATT connection 2012-01-20 11:54 [PATCH BlueZ v2 0/1] Add provision for terminating an ATT connection Smriti Gupta @ 2012-01-20 11:54 ` Smriti Gupta 2012-02-02 19:22 ` Claudio Takahasi 2012-02-02 20:01 ` Johan Hedberg 0 siblings, 2 replies; 4+ messages in thread From: Smriti Gupta @ 2012-01-20 11:54 UTC (permalink / raw) To: linux-bluetooth; +Cc: naresh.gupta, smritigupta2008, Smriti Gupta 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ v2 1/1] Add provision for terminating an ATT connection 2012-01-20 11:54 ` [PATCH BlueZ v2 1/1] " Smriti Gupta @ 2012-02-02 19:22 ` Claudio Takahasi 2012-02-02 20:01 ` Johan Hedberg 1 sibling, 0 replies; 4+ messages in thread From: Claudio Takahasi @ 2012-02-02 19:22 UTC (permalink / raw) To: Smriti Gupta; +Cc: linux-bluetooth, naresh.gupta, smritigupta2008 Hi Smriti Gupta, On Fri, Jan 20, 2012 at 8:54 AM, Smriti Gupta <smriti.gupta@stericsson.com> 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ v2 1/1] Add provision for terminating an ATT connection 2012-01-20 11:54 ` [PATCH BlueZ v2 1/1] " Smriti Gupta 2012-02-02 19:22 ` Claudio Takahasi @ 2012-02-02 20:01 ` Johan Hedberg 1 sibling, 0 replies; 4+ messages in thread From: Johan Hedberg @ 2012-02-02 20:01 UTC (permalink / raw) To: Smriti Gupta; +Cc: linux-bluetooth, naresh.gupta, smritigupta2008 Hi Smriti, On Fri, Jan 20, 2012, Smriti Gupta 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(-) Applied. Thanks. Johan ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-02 20:01 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-01-20 11:54 [PATCH BlueZ v2 0/1] Add provision for terminating an ATT connection Smriti Gupta 2012-01-20 11:54 ` [PATCH BlueZ v2 1/1] " Smriti Gupta 2012-02-02 19:22 ` Claudio Takahasi 2012-02-02 20:01 ` Johan Hedberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).