[PATCH 06/14] neard: Check if adapter is powered in PushOOB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For PushOOB adapter needs to be powered as bluetoothd daemon is
expected to perform action on success.
---
 plugins/neard.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/neard.c b/plugins/neard.c
index 131e8bd..0418430 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);
-- 
1.8.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux