summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-09-02 11:38:39 +0200
committerBastien Nocera <hadess@hadess.net>2022-09-02 11:38:39 +0200
commit29ecd92f9ce45f2dfcf71026e7e4ce16b67c0f26 (patch)
treebfec13cb150708606337609842a392ad6af4ebf3
parentcb4193ff9d2c421d5dc1bef054fb05521003f8d4 (diff)
downloadupower-29ecd92f9ce45f2dfcf71026e7e4ce16b67c0f26.tar.gz
linux: Fix BlueZ device names not synchronising
We were correctly handling an "Alias" property changing, but never passed the property to that code as we were dropping anything that wasn't a battery related update.
-rw-r--r--src/linux/up-backend.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/linux/up-backend.c b/src/linux/up-backend.c
index f95640c..aa7c769 100644
--- a/src/linux/up-backend.c
+++ b/src/linux/up-backend.c
@@ -117,12 +117,13 @@ up_backend_uevent_signal_handler_cb (GUdevClient *client, const gchar *action,
}
static gboolean
-is_battery_iface_proxy (GDBusProxy *interface_proxy)
+is_interesting_iface_proxy (GDBusProxy *interface_proxy)
{
const char *iface;
iface = g_dbus_proxy_get_interface_name (interface_proxy);
- return g_str_equal (iface, "org.bluez.Battery1");
+ return g_str_equal (iface, "org.bluez.Battery1") ||
+ g_str_equal (iface, "org.bluez.Device1");
}
static gboolean
@@ -149,7 +150,7 @@ bluez_proxies_changed (GDBusObjectManagerClient *manager,
GObject *object;
UpDeviceBluez *bluez;
- if (!is_battery_iface_proxy (interface_proxy))
+ if (!is_interesting_iface_proxy (interface_proxy))
return;
object = up_device_list_lookup (backend->priv->device_list, G_OBJECT (object_proxy));