summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes <andre@endlessm.com>2019-07-23 20:33:19 +0000
committerAndre Moreira Magalhaes <andre@endlessm.com>2019-08-07 21:28:47 -0300
commita32e51142140e3886b50ba7348783d867e900d0b (patch)
treef3cab782b6871bb7c6e2086df40de68fb1984577 /engine
parent6fbf07188542806f126bbee4f15bd0eb95057843 (diff)
downloaddconf-a32e51142140e3886b50ba7348783d867e900d0b.tar.gz
gdbus: Unref cached GDBusConnection objects when the connection is closed
This change fixes the dbus-leak tests by dropping the cached GDBusConnection objects references when the bus connection is closed. The issue was introduced with recent changes made to GLib[1] where invoking g_test_dbus_down() will fail after a timeout if the GDBusConnection object for the session bus leaks. Given g_test_dbus_down() will first close the connection before checking for leaks unreffing the object when the connection is closed should fix the issue. [1] https://gitlab.gnome.org/GNOME/glib/merge_requests/963 Signed-off-by: Andre Moreira Magalhaes <andre@endlessm.com>
Diffstat (limited to 'engine')
-rw-r--r--engine/dconf-engine.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/dconf-engine.h b/engine/dconf-engine.h
index 2485423..6d57782 100644
--- a/engine/dconf-engine.h
+++ b/engine/dconf-engine.h
@@ -67,6 +67,17 @@ GVariant * dconf_engine_dbus_call_sync_func (GBusTyp
const GVariantType *expected_type,
GError **error);
+/* Helper function used by the client library to handle bus disconnection */
+G_GNUC_INTERNAL
+void dconf_engine_dbus_handle_connection_closed (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ GMutex *bus_lock,
+ gboolean *bus_is_error,
+ gpointer *bus_data,
+ GCallback bus_closed_callback,
+ gpointer bus_closed_callback_user_data);
+
/* Notifies that a change occured.
*
* The engine lock is never held when calling this function so it is