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.
This commit is contained in:
Daniel Stone 2006-10-15 20:42:31 +03:00 committed by Daniel Stone
parent fc9b5f84b2
commit acd8419948

View File

@ -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;