summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2023-02-25 15:52:25 +0100
committerBastien Nocera <hadess@hadess.net>2023-02-27 14:12:39 +0100
commit81c97eef9d1874f1ae6367e5dde7dcfdc9479e2a (patch)
tree314b1b010ab60b718de67ce6b70cf746ac72df02 /src
parent7df5f2907cd78292061ad18ac6943c8615cfe091 (diff)
main: Fix warning for hidden device
Some Bluetooth devices can be hidden if they also export their battery info through the kernel, so make sure to not throw a warning when they go away. (upowerd:133931): UPower-WARNING **: 02:49:48.012: INTERNAL STATE CORRUPT (device-removed): not sending NULL, device:0x1f5dae0 Fixes: 778b93a336be ("linux: Hide duplicate Logitech Bluetooth devices")
Diffstat (limited to 'src')
-rw-r--r--src/up-daemon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/up-daemon.c b/src/up-daemon.c
index c2dd14b..b9f31d8 100644
--- a/src/up-daemon.c
+++ b/src/up-daemon.c
@@ -1001,13 +1001,14 @@ up_daemon_device_removed_cb (UpBackend *backend, UpDevice *device, UpDaemon *dae
/* emit */
object_path = up_device_get_object_path (device);
- g_debug ("emitting device-removed: %s", object_path);
/* don't crash the session */
if (object_path == NULL) {
- g_warning ("INTERNAL STATE CORRUPT (device-removed): not sending NULL, device:%p", device);
+ g_debug ("not emitting device-removed for unregistered device: %s",
+ up_exported_device_get_native_path (UP_EXPORTED_DEVICE (device)));
return;
}
+ g_debug ("emitting device-removed: %s", object_path);
up_exported_daemon_emit_device_removed (UP_EXPORTED_DAEMON (daemon), object_path);
/* In case a battery was removed */