From: Hemant Gupta <hemant.gupta@stericsson.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Hemant Gupta <hemantgupta.ste@gmail.com>,
Hemant Gupta <hemant.gupta@stericsson.com>
Subject: [PATCH v2] Adapter: Fix Discovering state while Powering Off
Date: Tue, 3 Apr 2012 17:23:59 +0530 [thread overview]
Message-ID: <1333454039-6961-1-git-send-email-hemant.gupta@stericsson.com> (raw)
This patch fixes the adater discovering state while powering off.
Without this fix, BlueZ sends incorrect discovering state to upper
layers while switching off.
---
src/adapter.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index eb9745f..f630196 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2319,10 +2319,17 @@ int btd_adapter_stop(struct btd_adapter *adapter)
ADAPTER_INTERFACE, "Pairable",
DBUS_TYPE_BOOLEAN, &prop_false);
- if (adapter->discovering)
+ if (adapter->discovering) {
emit_property_changed(connection, adapter->path,
ADAPTER_INTERFACE, "Discovering",
DBUS_TYPE_BOOLEAN, &prop_false);
+ /*
+ * Change the discovering state to FALSE, otherwise
+ * inquiry fails to start if BT is switched off and then on
+ * while inquiry is already active.
+ */
+ adapter->discovering = FALSE;
+ }
emit_property_changed(connection, adapter->path, ADAPTER_INTERFACE,
"Powered", DBUS_TYPE_BOOLEAN, &prop_false);
--
1.7.0.4
next reply other threads:[~2012-04-03 11:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 11:53 Hemant Gupta [this message]
2012-04-04 10:03 ` [PATCH v2] Adapter: Fix Discovering state while Powering Off 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=1333454039-6961-1-git-send-email-hemant.gupta@stericsson.com \
--to=hemant.gupta@stericsson.com \
--cc=hemantgupta.ste@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).