From c8e4251699f8811a9a3358d9797a6dfc30b9feee Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Fri, 23 Aug 2013 17:19:51 +0800 Subject: [PATCH v2 6/7] Fix debug output about dbus server ref count dbus_server_disconnect() invokes dbus_server_unref() at the end of function, the latter will print a trace about server ref count decrease 1. However, it doesn't invoke dbus_server_ref(), so there isn't a trace about server ref count increase in debug output. --- dbus/dbus-server.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index 1a7412f..b8b136c 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -786,16 +786,7 @@ dbus_server_disconnect (DBusServer *server) { _dbus_return_if_fail (server != NULL); -#ifdef DBUS_DISABLE_CHECKS - _dbus_atomic_inc (&server->refcount); -#else - { - dbus_int32_t old_refcount = _dbus_atomic_inc (&server->refcount); - - _dbus_return_if_fail (old_refcount > 0); - } -#endif - + dbus_server_ref (server); SERVER_LOCK (server); _dbus_assert (server->vtable->disconnect != NULL); -- 1.7.9.5