diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2013-02-07 09:13:56 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-02-15 10:41:22 +0200 |
commit | 127b948210e8630bcf5d4029297ba2181b40ca55 (patch) | |
tree | e7447a8e3ba003f376feb8bdc8996bb9ffbacb54 /plugins/neard.c | |
parent | 26653cd1758e03aa9a5a7bc56cbddff1c18699a0 (diff) | |
download | bluez-127b948210e8630bcf5d4029297ba2181b40ca55.tar.gz |
neard: Check if adapter is powered in PushOOB
For PushOOB adapter needs to be powered as bluetoothd daemon is
expected to perform action on success.
Diffstat (limited to 'plugins/neard.c')
-rw-r--r-- | plugins/neard.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/neard.c b/plugins/neard.c index 131e8bd08..04184307b 100644 --- a/plugins/neard.c +++ b/plugins/neard.c @@ -629,6 +629,9 @@ static DBusMessage *push_oob(DBusConnection *conn, DBusMessage *msg, void *data) if (err < 0) return error_reply(msg, -err); + if (!btd_adapter_get_powered(adapter)) + return error_reply(msg, ENONET); + agent = adapter_get_agent(adapter); if (!agent) return error_reply(msg, ENONET); |