46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
|
From 6d58c739371ab6d699871b9864db5f23d987d27e Mon Sep 17 00:00:00 2001
|
||
|
From: Jan Beich <jbeich@FreeBSD.org>
|
||
|
Date: Sun, 8 Jan 2023 02:06:35 +0000
|
||
|
Subject: [PATCH] module-rt: fix warning when xdg-desktop-portal isn't running
|
||
|
|
||
|
$ pipewire
|
||
|
...
|
||
|
[W][1234.001] mod.rt | [ module-rt.c: 278 pw_rtkit_check_xdg_portal()] Can't find xdg-portal: (null)
|
||
|
...
|
||
|
---
|
||
|
src/modules/module-rt.c | 16 ++++------------
|
||
|
1 file changed, 4 insertions(+), 12 deletions(-)
|
||
|
|
||
|
diff --git a/src/modules/module-rt.c b/src/modules/module-rt.c
|
||
|
index 5cfd766e4..6f3dbecd5 100644
|
||
|
--- a/src/modules/module-rt.c
|
||
|
+++ b/src/modules/module-rt.c
|
||
|
@@ -269,20 +269,12 @@ struct pw_rtkit_bus *pw_rtkit_bus_get_session(void)
|
||
|
|
||
|
bool pw_rtkit_check_xdg_portal(struct pw_rtkit_bus *system_bus)
|
||
|
{
|
||
|
- DBusError error;
|
||
|
- bool ret = true;
|
||
|
-
|
||
|
- dbus_error_init(&error);
|
||
|
-
|
||
|
- if (!dbus_bus_name_has_owner(system_bus->bus, XDG_PORTAL_SERVICE_NAME, &error)) {
|
||
|
- pw_log_warn("Can't find xdg-portal: %s", error.name);
|
||
|
- ret = false;
|
||
|
- goto finish;
|
||
|
+ if (!dbus_bus_name_has_owner(system_bus->bus, XDG_PORTAL_SERVICE_NAME, NULL)) {
|
||
|
+ pw_log_warn("Can't find %s. Is xdg-desktop-portal running?", XDG_PORTAL_SERVICE_NAME);
|
||
|
+ return false;
|
||
|
}
|
||
|
-finish:
|
||
|
- dbus_error_free(&error);
|
||
|
|
||
|
- return ret;
|
||
|
+ return true;
|
||
|
}
|
||
|
|
||
|
void pw_rtkit_bus_free(struct pw_rtkit_bus *system_bus)
|
||
|
--
|
||
|
GitLab
|
||
|
|