All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] policy: Change AutoEnable default to true
@ 2022-04-13 22:24 Luiz Augusto von Dentz
  2022-04-15  6:45 ` [BlueZ] " bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2022-04-13 22:24 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This changes the default of AutoEnable to true so controllers are power
up by default.

Fixes: https://github.com/bluez/bluez/issues/328
---
 plugins/policy.c | 6 +++++-
 src/main.conf    | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/plugins/policy.c b/plugins/policy.c
index 48f5db7d3..0bbdbfc88 100644
--- a/plugins/policy.c
+++ b/plugins/policy.c
@@ -892,7 +892,11 @@ static int policy_init(void)
 	}
 
 	auto_enable = g_key_file_get_boolean(conf, "Policy", "AutoEnable",
-									NULL);
+								&gerr);
+	if (gerr) {
+		g_clear_error(&gerr);
+		auto_enable = true;
+	}
 
 	resume_delay = g_key_file_get_integer(
 			conf, "Policy", "ResumeDelay", &gerr);
diff --git a/src/main.conf b/src/main.conf
index 401796235..91b98b8c4 100644
--- a/src/main.conf
+++ b/src/main.conf
@@ -276,8 +276,8 @@
 
 # AutoEnable defines option to enable all controllers when they are found.
 # This includes adapters present on start as well as adapters that are plugged
-# in later on. Defaults to 'false'.
-#AutoEnable=false
+# in later on. Defaults to 'true'.
+#AutoEnable=true
 
 # Audio devices that were disconnected due to suspend will be reconnected on
 # resume. ResumeDelay determines the delay between when the controller
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-19 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13 22:24 [PATCH BlueZ] policy: Change AutoEnable default to true Luiz Augusto von Dentz
2022-04-15  6:45 ` [BlueZ] " bluez.test.bot
2022-04-19  0:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
2022-04-19  8:48 ` Marcel Holtmann
2022-04-19 17:52   ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.