diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-06 02:31:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-04-06 02:31:22 +0200 |
commit | 90f4fdb0718f4cdef717c555fe2ed81ff59f6fce (patch) | |
tree | e925bc0ef4372a605e206b2cc12da4160b954611 /src/pulsecore | |
parent | ecba42bd302ee5737adc462437abc42160827e8c (diff) |
make sure we keep a reference of the bus connection during the whole runtime if we manage to acquire the bus name
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/dbus-util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c index d712bff3..7302867f 100644 --- a/src/pulsecore/dbus-util.c +++ b/src/pulsecore/dbus-util.c @@ -244,7 +244,7 @@ static void wakeup_main(void *userdata) { pa_dbus_wrap_connection* pa_dbus_wrap_connection_new(pa_mainloop_api *m, DBusBusType type, DBusError *error) { DBusConnection *conn; - pa_dbus_wrap_connection *pconn = NULL; + pa_dbus_wrap_connection *pconn; pa_assert(type == DBUS_BUS_SYSTEM || type == DBUS_BUS_SESSION || type == DBUS_BUS_STARTER); @@ -273,7 +273,8 @@ void pa_dbus_wrap_connection_free(pa_dbus_wrap_connection* c) { dbus_connection_close(c->connection); /* must process remaining messages, bit of a kludge to handle * both unload and shutdown */ - while (dbus_connection_read_write_dispatch(c->connection, -1)); + while (dbus_connection_read_write_dispatch(c->connection, -1)) + ; } c->mainloop->defer_free(c->dispatch_event); |