All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] device: Shutdown connection if ATTIO list is empty
@ 2012-02-08 19:05 Andre Guedes
  2012-02-09 10:50 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Guedes @ 2012-02-08 19:05 UTC (permalink / raw)
  To: linux-bluetooth

Shutdown the ongoing connection attempt if the last ATTIO callback
is removed from the list.
---
 src/device.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/device.c b/src/device.c
index c7c741c..b0e6adc 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2883,5 +2883,11 @@ gboolean btd_device_remove_attio_callback(struct btd_device *device, guint id)
 		device->attrib = NULL;
 	}
 
+	if (device->att_io) {
+		g_io_channel_shutdown(device->att_io, FALSE, NULL);
+		g_io_channel_unref(device->att_io);
+		device->att_io = NULL;
+	}
+
 	return TRUE;
 }
-- 
1.7.9


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] device: Shutdown connection if ATTIO list is empty
  2012-02-08 19:05 [PATCH] device: Shutdown connection if ATTIO list is empty Andre Guedes
@ 2012-02-09 10:50 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-02-09 10:50 UTC (permalink / raw)
  To: Andre Guedes; +Cc: linux-bluetooth

Hi Andre,

On Wed, Feb 08, 2012, Andre Guedes wrote:
> Shutdown the ongoing connection attempt if the last ATTIO callback
> is removed from the list.
> ---
>  src/device.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)

Applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-09 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-08 19:05 [PATCH] device: Shutdown connection if ATTIO list is empty Andre Guedes
2012-02-09 10:50 ` Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.