diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-05-06 22:54:48 +0200 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-05-11 10:55:46 +0100 |
commit | f8e8a038a3ea8dbba027de74071f5f96ee048bea (patch) | |
tree | cc5225d9a3cb03b714dac8d0978add04820ba837 | |
parent | b72fc9b4f158bafb66a7de28ce038986d96ce850 (diff) |
rtkit: use private bus connection in order to avoid threading issues when invoking pa_make_realtime()
-rw-r--r-- | src/pulsecore/core-util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index b662a7e0..e950c6b7 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -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) { |