From 60788ddd043efcb5d2fe97966498b451dab55fe3 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Tue, 20 Aug 2013 15:10:39 +0800 Subject: [PATCH 07/10] dbus-server.c: trace all server ref count change events Two small changes for this topic. * trace server init event * call dbus_server_ref() to trace server ref count change event because it will call dbus_server_unref later --- dbus/dbus-server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index 02cf5a3..60ea5e9 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -116,6 +116,9 @@ _dbus_server_init_base (DBusServer *server, server->vtable = vtable; _dbus_atomic_inc (&server->refcount); + _dbus_server_trace_ref (server, 0, + _dbus_atomic_get (&server->refcount), + "init_base"); server->address = NULL; server->watches = NULL; @@ -773,7 +776,7 @@ dbus_server_disconnect (DBusServer *server) _dbus_return_if_fail (server != NULL); _dbus_return_if_fail (_dbus_atomic_get (&server->refcount) > 0); - _dbus_atomic_inc (&server->refcount); + dbus_server_ref (server); SERVER_LOCK (server); -- 1.7.9.5