chiark / gitweb /
dbus: explicitly flush message queue before disconnecting
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Apr 2010 01:20:04 +0000 (03:20 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Apr 2010 01:20:04 +0000 (03:20 +0200)
dbus.c

diff --git a/dbus.c b/dbus.c
index 79b1a7e..6b7896b 100644 (file)
--- a/dbus.c
+++ b/dbus.c
@@ -637,6 +637,7 @@ void bus_done_api(Manager *m) {
                         m->system_bus = NULL;
 
                 dbus_connection_set_dispatch_status_function(m->api_bus, NULL, NULL, NULL);
+                dbus_connection_flush(m->api_bus);
                 dbus_connection_close(m->api_bus);
                 dbus_connection_unref(m->api_bus);
                 m->api_bus = NULL;
@@ -664,6 +665,7 @@ void bus_done_system(Manager *m) {
 
         if (m->system_bus) {
                 dbus_connection_set_dispatch_status_function(m->system_bus, NULL, NULL, NULL);
+                dbus_connection_flush(m->system_bus);
                 dbus_connection_close(m->system_bus);
                 dbus_connection_unref(m->system_bus);
                 m->system_bus = NULL;