From: Andre Guedes <andre.guedes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] device: Shutdown connection if ATTIO list is empty
Date: Wed, 8 Feb 2012 16:05:10 -0300 [thread overview]
Message-ID: <1328727910-20179-1-git-send-email-andre.guedes@openbossa.org> (raw)
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
next reply other threads:[~2012-02-08 19:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 19:05 Andre Guedes [this message]
2012-02-09 10:50 ` [PATCH] device: Shutdown connection if ATTIO list is empty Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1328727910-20179-1-git-send-email-andre.guedes@openbossa.org \
--to=andre.guedes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).