diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-07 02:21:16 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-07 02:21:42 +0200 |
commit | 7b97f4773207d9e1301f5263229ceba26b515756 (patch) | |
tree | 14bc287367bd00a79dc793a35fafdd65a1557ac3 /src/dbus.c | |
parent | ed4c1cc672560b72aa1c5a74cd692a65811dd589 (diff) |
dbus: send reload completion message on right connection
Diffstat (limited to 'src/dbus.c')
-rw-r--r-- | src/dbus.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/dbus.c b/src/dbus.c index 6660cf0c5a..576f7850b2 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -496,12 +496,13 @@ unsigned bus_dispatch(Manager *m) { * dispatch any D-Bus messages, so that we won't end * up wanting to queue another message. */ - if (m->api_bus) - if (!dbus_connection_send(m->api_bus, m->queued_message, NULL)) + if (m->queued_message_connection) + if (!dbus_connection_send(m->queued_message_connection, m->queued_message, NULL)) return 0; dbus_message_unref(m->queued_message); m->queued_message = NULL; + m->queued_message_connection = NULL; } if ((c = set_first(m->bus_connections_for_dispatch))) { @@ -991,6 +992,15 @@ static void shutdown_connection(Manager *m, DBusConnection *c) { set_free(s); } + if (m->queued_message_connection == c) { + m->queued_message_connection = NULL; + + if (m->queued_message) { + dbus_message_unref(m->queued_message); + m->queued_message = NULL; + } + } + dbus_connection_set_dispatch_status_function(c, NULL, NULL, NULL); dbus_connection_flush(c); dbus_connection_close(c); |