diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-05-06 22:54:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-05-06 23:09:54 +0200 |
commit | 8eed56961481bded395005cfd1729c045c23b289 (patch) | |
tree | 210a5c95186750da6962045144b8f19d64ce154a /src | |
parent | 320b70e94ef8a253a954f316550a02fb94eb964d (diff) |
rtkit: use private bus connection in order to avoid threading issues when invoking pa_make_realtime()
Diffstat (limited to 'src')
-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 f769b325..6902ee98 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -661,7 +661,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; @@ -674,6 +674,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) { |