mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-02-07 04:07:06 -05:00
rtkit: use private bus connection in order to avoid threading issues when invoking pa_make_realtime()
This commit is contained in:
parent
b72fc9b4f1
commit
f8e8a038a3
1 changed files with 2 additions and 1 deletions
|
|
@ -638,7 +638,7 @@ static int set_scheduler(int rtprio) {
|
|||
#ifdef HAVE_DBUS
|
||||
/* Try to talk to RealtimeKit */
|
||||
|
||||
if (!(bus = dbus_bus_get(DBUS_BUS_SYSTEM, &error))) {
|
||||
if (!(bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) {
|
||||
pa_log("Failed to connect to system bus: %s\n", error.message);
|
||||
dbus_error_free(&error);
|
||||
errno = -EIO;
|
||||
|
|
@ -651,6 +651,7 @@ static int set_scheduler(int rtprio) {
|
|||
dbus_connection_set_exit_on_disconnect(bus, FALSE);
|
||||
|
||||
r = rtkit_make_realtime(bus, 0, rtprio);
|
||||
dbus_connection_close(bus);
|
||||
dbus_connection_unref(bus);
|
||||
|
||||
if (r >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue