summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-12-08 16:22:33 +0100
committerBastien Nocera <hadess@hadess.net>2021-12-15 17:25:08 +0100
commit4910b98ae366a449e75cf5405e533e9e85207efc (patch)
treeb5a774909e789d11c9b4cce6ef2216d2edaf5fbd
parent777dcf752c4bf3dadf645c7da36b7ae4edd78067 (diff)
downloadgnome-bluetooth-4910b98ae366a449e75cf5405e533e9e85207efc.tar.gz
lib: Add debug to adapter's "notify" callback
-rw-r--r--lib/bluetooth-client.c11
1 files changed, 10 insertions, 1 deletions
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);