From 90f4fdb0718f4cdef717c555fe2ed81ff59f6fce Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 6 Apr 2009 02:31:22 +0200 Subject: make sure we keep a reference of the bus connection during the whole runtime if we manage to acquire the bus name --- src/pulsecore/dbus-util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pulsecore') 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); -- cgit