[gnome-bluetooth/wip/hadess/btd-restart-fixes: 5/13] lib: Add debug to adapter's "notify" callback
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/btd-restart-fixes: 5/13] lib: Add debug to adapter's "notify" callback
- Date: Wed, 15 Dec 2021 16:53:14 +0000 (UTC)
commit 4910b98ae366a449e75cf5405e533e9e85207efc
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 8 16:22:33 2021 +0100
lib: Add debug to adapter's "notify" callback
lib/bluetooth-client.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index d73eb4bc..bdc136cf 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -484,9 +484,18 @@ adapter_notify_cb (Adapter1 *adapter,
const char *default_adapter_path;
adapter_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY (adapter));
+ if (client->default_adapter == NULL) {
+ g_debug ("Property '%s' changed on adapter '%s', but default adapter not set yet",
+ property, adapter_path);
+ return;
+ }
+
default_adapter_path = g_dbus_proxy_get_object_path (G_DBUS_PROXY (client->default_adapter));
- if (g_strcmp0 (default_adapter_path, adapter_path) != 0)
+ if (g_strcmp0 (default_adapter_path, adapter_path) != 0) {
+ g_debug ("Ignoring property '%s' change on non-default adapter %s",
+ property, adapter_path);
return;
+ }
g_debug ("Property '%s' changed on default adapter '%s'", property, adapter_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]