2012-02-08 19:05:10

by Andre Guedes

[permalink] [raw]
Subject: [PATCH] device: Shutdown connection if ATTIO list is empty

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



2012-02-09 10:50:54

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] device: Shutdown connection if ATTIO list is empty

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