From 7020b573764bb86551d329e867c2e87172424c9b Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 1 Oct 2006 17:21:03 +0000 Subject: 2006-10-01 Havoc Pennington * test/test-service.c (path_message_func): remove broken extra unref that was hidden by the bugs in dbus-connection.c/dbus-bus.c * test/test-shell-service.c (path_message_func): same fix * dbus/dbus-connection.c (_dbus_connection_get_dispatch_status_unlocked): break up the function a little for clarity and fix the notification of dbus-bus.c to not require dispatch to be complete * dbus/dbus-connection.c (dbus_connection_unref): improve the warning when you try to finalize an open connection. --- dbus/dbus-bus.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-bus.c') diff --git a/dbus/dbus-bus.c b/dbus/dbus-bus.c index f6918fd5..9eb2c526 100644 --- a/dbus/dbus-bus.c +++ b/dbus/dbus-bus.c @@ -257,6 +257,10 @@ bus_data_free (void *data) int i; _DBUS_LOCK (bus); /* We may be stored in more than one slot */ + /* This should now be impossible - these slots are supposed to + * be cleared on disconnect, so should not need to be cleared on + * finalize + */ i = 0; while (i < N_BUS_TYPES) { @@ -427,7 +431,10 @@ internal_bus_get (DBusBusType type, if (!private) { - /* get a weak ref to the connection */ + /* store a weak ref to the connection (dbus-connection.c is + * supposed to have a strong ref that it drops on disconnect, + * since this is a shared connection) + */ bus_connections[type] = connection; } -- cgit