From f63612e50fb6af9aca7228edf15e511a65bb5dae Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Tue, 13 Nov 2018 11:19:55 +0900 Subject: [PATCH] Bug fix: revert wrong workround code(closing gdbus stream) As comment(on Related fixes #1), glib reports bug on "https://bugzilla.gnome.org/show_bug.cgi?id=734281. But it is wrong report and is fixed by https://gitlab.gnome.org/GNOME/glib/commit/bf1a2d707928e129c96af365330b3ac26b04ad15 Related fixes #1 - commit : 94b01a47636b0787c9b39a5a1f3569edbdc593e9 - comment :"Release 0.0.3" Related fixes #2 - commit : 1c25a3cfa328a407cd2f4af59d8fe3a2b0e59cb0 - comment : "Bug fix: do not close dbus io stream when group/user service was stopped." Change-Id: I721040da87a97be87de454b670125db1d671ac2e Signed-off-by: INSUN PYO --- src/daemon/dbus/gumd-dbus-server-msg-bus.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/daemon/dbus/gumd-dbus-server-msg-bus.c b/src/daemon/dbus/gumd-dbus-server-msg-bus.c index f67d0c8..807bab2 100755 --- a/src/daemon/dbus/gumd-dbus-server-msg-bus.c +++ b/src/daemon/dbus/gumd-dbus-server-msg-bus.c @@ -147,8 +147,7 @@ _on_bus_acquired ( DBG("Export user service interface"); - server->priv->connection = connection; - g_object_ref(server->priv->connection); + server->priv->connection = g_object_ref(connection); server->priv->user_service = gumd_dbus_user_service_adapter_new_with_connection ( @@ -268,6 +267,7 @@ gumd_dbus_server_msg_bus_init ( self->priv->user_service = NULL; self->priv->group_service = NULL; self->priv->name_owner_id = 0; + self->priv->connection = NULL; } static gboolean @@ -318,21 +318,16 @@ _gumd_dbus_server_msg_bus_stop ( server->priv->user_service = NULL; } - if (server->priv->connection) { - GIOStream *stream = g_dbus_connection_get_stream (server->priv->connection); - if (stream) { - DBG("g_io_stream_close '%p'", stream); - g_io_stream_close (stream, NULL, NULL); - } - g_object_unref (server->priv->connection); - server->priv->connection = NULL; - } - if (server->priv->name_owner_id) { g_bus_unown_name (server->priv->name_owner_id); server->priv->name_owner_id = 0; } + if (server->priv->connection) { + g_object_unref (server->priv->connection); + server->priv->connection = NULL; + } + return TRUE; } -- 2.7.4