summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2008-11-11 17:05:28 -0500
committerDavid Reveman <davidr@novell.com>2008-11-11 17:05:28 -0500
commit2681b50b44e5b8f14165835f4b5e1303663c4434 (patch)
tree504965d014201878db9d3b87bc108a02ff600f18
parent9fd9c35af06182d802b31936cc89e334fd85b56d (diff)
Use a private system bus connection to properly handle
teardown and reconnect during server reset.
-rw-r--r--config/dbus-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/dbus-core.c b/config/dbus-core.c
index b349c6e3c..8b97e249c 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -85,7 +85,7 @@ teardown(void)
* completeness. But then it gets awkward, given that you can't
* guarantee that they'll be called ... */
if (bus_info.connection)
- dbus_connection_unref(bus_info.connection);
+ dbus_connection_close(bus_info.connection);
RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
if (bus_info.fd != -1)
@@ -140,7 +140,7 @@ connect_to_bus(void)
struct config_dbus_core_hook *hook;
dbus_error_init(&error);
- bus_info.connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
+ bus_info.connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
if (!bus_info.connection || dbus_error_is_set(&error)) {
DebugF("[config/dbus-core] error connecting to system bus: %s (%s)\n",
error.name, error.message);