2020-08-21 06:34:11

by Sonny Sasaka

[permalink] [raw]
Subject: [PATCH BlueZ] adapter: Log the power state change of adapter to info level

From: Miao-chen Chou <[email protected]>

This changes the log level of messages in adapter_start() and
adapter_stop() in order to have better visibility on the power state of
adapter in bluetoothd log.

Tested that on Chrome OS this has helped debug many issues more easily.

Reviewed-by: Sonny Sasaka <[email protected]>

---
src/adapter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 5e896a9f0..9ffe8e7e4 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -5258,7 +5258,7 @@ static void adapter_start(struct btd_adapter *adapter)
g_dbus_emit_property_changed(dbus_conn, adapter->path,
ADAPTER_INTERFACE, "Powered");

- DBG("adapter %s has been enabled", adapter->path);
+ info("adapter %s has been enabled", adapter->path);

trigger_passive_scanning(adapter);
}
@@ -6884,7 +6884,7 @@ static void adapter_stop(struct btd_adapter *adapter)
g_dbus_emit_property_changed(dbus_conn, adapter->path,
ADAPTER_INTERFACE, "Powered");

- DBG("adapter %s has been disabled", adapter->path);
+ info("adapter %s has been disabled", adapter->path);
}

int btd_register_adapter_driver(struct btd_adapter_driver *driver)
--
2.26.2