From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 2/2] core: Fix leaking disconnect message
Date: Tue, 10 Dec 2013 10:41:17 +0200 [thread overview]
Message-ID: <1386664877-10137-2-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1386664877-10137-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If a disconnect message is pending return an error since currently the
code cannot process it in parallel.
---
src/device.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/device.c b/src/device.c
index 953a338..18543ee 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1434,6 +1434,9 @@ static DBusMessage *disconnect_profile(DBusConnection *conn, DBusMessage *msg,
if (!service)
return btd_error_invalid_args(msg);
+ if (dev->disconnect)
+ return btd_error_in_progress(msg);
+
dev->disconnect = dbus_message_ref(msg);
err = btd_service_disconnect(service);
--
1.8.3.1
next prev parent reply other threads:[~2013-12-10 8:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 8:41 [PATCH BlueZ 1/2] core: Fix not replying to DisconnectProfile Luiz Augusto von Dentz
2013-12-10 8:41 ` Luiz Augusto von Dentz [this message]
2013-12-10 9:32 ` 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=1386664877-10137-2-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--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).