[PATCH BlueZ] mgmtops: Fix calling btd_adapter_start() for an off adapter

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

 



When the adapter mode is off and the controller is down, we should
not consider that the adapter is powered up.
---
 plugins/mgmtops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index c060ada..4c86389 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -1074,7 +1074,7 @@ static void read_info_complete(int sk, uint16_t index, void *buf, size_t len)
 
 	if (mode != MODE_OFF && !mgmt_powered(info->current_settings))
 		mgmt_set_powered(index, TRUE);
-	else {
+	else if (mode != MODE_OFF) {
 		get_connections(sk, index);
 		btd_adapter_start(adapter);
 	}
-- 
1.7.10.4

--
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