From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 1/5] core: Fix set_pairable to not attempt to power on the adapter
Date: Mon, 17 Dec 2012 17:45:51 +0200 [thread overview]
Message-ID: <1355759155-27921-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Pairable flag is completely independent flag for the kernel so we can
reflect this in the D-Bus API.
---
src/adapter.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index 96a23e9..375bff4 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -417,29 +417,9 @@ static void set_powered(struct btd_adapter *adapter, gboolean powered,
static void set_pairable(struct btd_adapter *adapter, gboolean pairable,
bool reply, GDBusPendingPropertySet id)
{
- int err;
-
- if (!adapter->connectable)
- return g_dbus_pending_property_error(id,
- ERROR_INTERFACE ".NotReady",
- "Resource Not Ready");
-
if (pairable == adapter->pairable)
goto done;
- if (!adapter->discoverable)
- goto store;
-
- err = set_mode(adapter, MODE_DISCOVERABLE);
- if (err < 0) {
- if (reply)
- g_dbus_pending_property_error(id,
- ERROR_INTERFACE ".Failed",
- strerror(-err));
- return;
- }
-
-store:
mgmt_set_pairable(adapter->dev_id, pairable);
done:
--
1.7.11.7
next reply other threads:[~2012-12-17 15:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 15:45 Luiz Augusto von Dentz [this message]
2012-12-17 15:45 ` [PATCH BlueZ 2/5] core: Fix set_discoverable to not attempt to power on the adapter Luiz Augusto von Dentz
2012-12-17 15:45 ` [PATCH BlueZ 3/5] core: Simplify set_powered to not use set_mode Luiz Augusto von Dentz
2012-12-17 15:55 ` Anderson Lizardo
2012-12-17 18:30 ` Johan Hedberg
2012-12-17 15:45 ` [PATCH BlueZ 4/5] core: Remove mode session code Luiz Augusto von Dentz
2012-12-17 15:45 ` [PATCH BlueZ 5/5] core: Fix emitting changes to properties on power off Luiz Augusto von Dentz
2012-12-17 15:51 ` [PATCH BlueZ 1/5] core: Fix set_pairable to not attempt to power on the adapter 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=1355759155-27921-1-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