From acd8419948003032056a56d46adbef7c35e7739c Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sun, 15 Oct 2006 20:42:31 +0300 Subject: [PATCH] config: unref connection, don't close it Just unref the connection instead of explicitly closing it (thanks, Rob McQueen). Add a commented-out unregister_object_path call: unfortunately, when we call it, libdbus segfaults. But if we don't unregister the path, we can't register it again. So regenerations are broken either way, but a little less violently like this. --- config/config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.c b/config/config.c index e3c33aaa1..a50302f2f 100644 --- a/config/config.c +++ b/config/config.c @@ -319,9 +319,13 @@ configFini() if (configConnection) { dbus_error_init(&error); + /* This causes a segfault inside libdbus. Sigh. */ +#if 0 + dbus_connection_unregister_object_path(configConnection, busobject); +#endif dbus_bus_remove_match(configConnection, MATCH_RULE, &error); dbus_bus_release_name(configConnection, busname, &error); - dbus_connection_close(configConnection); + dbus_connection_unref(configConnection); RemoveGeneralSocket(configfd); configConnection = NULL; configfd = -1;