summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-connection.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-17 05:39:10 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-17 05:39:10 +0000
commitf7c24715b5489b28b47499eb252b941b735fa1bc (patch)
tree53e62e764a0c5e0ba25791b6f6ae3dbbf1fc4f54 /dbus/dbus-connection.c
parent15f02e1071ab14a7bc937cb61a4439a69c14f1a5 (diff)
2003-03-17 Havoc Pennington <hp@pobox.com>
All tests pass, no memleaks, no valgrind complaints. * bus/test.c: refcount handler_slot * bus/connection.c (bus_connections_new): refcount connection_data_slot * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused bytes so that auth scripts pass. * bus/dispatch.c: init message_handler_slot so it gets allocated properly * bus/dispatch.c (message_handler_slot_ref): fix memleak * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new): dealloc server_pipe_hash when no longer used for benefit of leak checking * dbus/dbus-auth.c (process_command): memleak fix * bus/dispatch.c (check_hello_message): memleak fix
Diffstat (limited to 'dbus/dbus-connection.c')
-rw-r--r--dbus/dbus-connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index ed677e74..d70ff716 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -866,6 +866,8 @@ _dbus_connection_last_unref (DBusConnection *connection)
DBusHashIter iter;
DBusList *link;
+ _dbus_verbose ("Finalizing connection %p\n", connection);
+
_dbus_assert (connection->refcount == 0);
/* You have to disconnect the connection before unref:ing it. Otherwise
@@ -969,6 +971,10 @@ dbus_connection_unref (DBusConnection *connection)
connection->refcount -= 1;
last_unref = (connection->refcount == 0);
+#if 0
+ _dbus_verbose ("unref() connection %p count = %d\n", connection, connection->refcount);
+#endif
+
dbus_mutex_unlock (connection->mutex);
if (last_unref)