diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-09-02 11:38:39 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-09-02 11:38:39 +0200 |
commit | 29ecd92f9ce45f2dfcf71026e7e4ce16b67c0f26 (patch) | |
tree | bfec13cb150708606337609842a392ad6af4ebf3 | |
parent | cb4193ff9d2c421d5dc1bef054fb05521003f8d4 (diff) | |
download | upower-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.c | 7 |
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)); |